fix: 修正 JavaScript 字符串转义问题(使用双反斜杠)

问题分析:
- Flask render_template_string 会解析字符串中的转义序列
- Python 字符串 '\n' 在渲染后变成真实的换行符
- 导致 JavaScript 语法错误

修复方案:
- 使用双反斜杠 '\\n'
- 渲染后得到正确的 JavaScript 字符串 '\n'
- 避免换行符直接出现在 JavaScript 代码中
This commit is contained in:
2026-06-01 11:47:01 +08:00
parent 1fdb00a1ec
commit ccc84e4d36
3 changed files with 7 additions and 7 deletions

Binary file not shown.