Commit Graph
1 Commits
Author SHA1 Message Date
Test UserandClaude Opus 4.7 49d4dbbadb fix: use JSON.stringify for caption text escaping in generated JS
The generated JavaScript used manual single-quote escaping
(replace(/\\/g, '\\\\').replace(/'/g, \"'\\\\''\")) which missed
newlines, carriage returns, and other special characters. Captions
containing line breaks would produce syntactically broken JS.

Use JSON.stringify which handles all JS string special characters
correctly, including newlines, unicode, and control characters.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 09:35:00 +08:00