问题分析: - Flask render_template_string 会解析字符串中的转义序列 - Python 字符串 '\n' 在渲染后变成真实的换行符 - 导致 JavaScript 语法错误 修复方案: - 使用双反斜杠 '\\n' - 渲染后得到正确的 JavaScript 字符串 '\n' - 避免换行符直接出现在 JavaScript 代码中
690 B
690 B
[2026-06-01 11:46:32] ==================================================
[2026-06-01 11:46:32] 项目服务管理面板 v2.0.0 启动
[2026-06-01 11:46:32] 访问地址: http://localhost:16022
[2026-06-01 11:46:32] 进程PID: 775569
[2026-06-01 11:46:32] ==================================================
* Serving Flask app 'app'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:16022
* Running on http://192.168.0.101:16022
Press CTRL+C to quit
127.0.0.1 - - [01/Jun/2026 11:46:50] "GET / HTTP/1.1" 200 -
[2026-06-01 11:46:32] 项目服务管理面板 v2.0.0 启动
[2026-06-01 11:46:32] 访问地址: http://localhost:16022
[2026-06-01 11:46:32] 进程PID: 775569
[2026-06-01 11:46:32] ==================================================
* Serving Flask app 'app'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:16022
* Running on http://192.168.0.101:16022
Press CTRL+C to quit
127.0.0.1 - - [01/Jun/2026 11:46:50] "GET / HTTP/1.1" 200 -