-
Notifications
You must be signed in to change notification settings - Fork 1
fix: Variables Editor client script fails to parse, blanking the whole UI #229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -526,7 +526,7 @@ function escapeHtml(s) { | |
| // (see DistService.saveTemplateVariablesFile). Backslash/quote-escape for the JS-string | ||
| // context first, then HTML-escape the result so it can't break out of the attribute either. | ||
| function escapeJsAttr(s) { | ||
| return escapeHtml(String(s).replace(/\\/g, '\\\\').replace(/'/g, "\\'")); | ||
| return escapeHtml(String(s).replace(/\\\\/g, '\\\\\\\\').replace(/'/g, "\\\\'")); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Escape JavaScript line terminators as well. Although the backslash fix resolves the reported issue, Suggested source-level fix- return escapeHtml(String(s).replace(/\\\\/g, '\\\\\\\\').replace(/'/g, "\\\\'"));
+ return escapeHtml(
+ String(s)
+ .replace(/\\\\/g, '\\\\\\\\')
+ .replace(/'/g, "\\\\'")
+ .replace(/\\r/g, '\\\\r')
+ .replace(/\\n/g, '\\\\n')
+ .replace(/\\u2028/g, '\\\\u2028')
+ .replace(/\\u2029/g, '\\\\u2029'),
+ );🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| function showBanner(type, html) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the heading-level jump.
Line 1 uses an H1 release heading. Line 4 uses an H3 heading. This skips H2 and triggers markdownlint MD001. Change
### Bug Fixesto## Bug Fixes.Suggested fix
📝 Committable suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.23.2)
[warning] 4-4: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
🤖 Prompt for AI Agents
Source: Linters/SAST tools