Skip to content

Fix remediation table rendering by emitting valid JSON#134

Merged
summitt merged 1 commit into
mainfrom
fix-remediation-table-json
May 26, 2026
Merged

Fix remediation table rendering by emitting valid JSON#134
summitt merged 1 commit into
mainfrom
fix-remediation-table-json

Conversation

@summitt
Copy link
Copy Markdown
Contributor

@summitt summitt commented May 26, 2026

Struts' escapeJavaScript escapes a single quote as ' which is not a
valid JSON escape sequence and breaks JSON.parse for the remediation
DataTable when a value contains a quote. Add a jsonEscape() helper backed
by Jackson's JsonStringEncoder and use it for the string values rendered
in vulnsJson.jsp.

Struts' escapeJavaScript escapes a single quote as \' which is not a
valid JSON escape sequence and breaks JSON.parse for the remediation
DataTable when a value contains a quote. Add a jsonEscape() helper backed
by Jackson's JsonStringEncoder and use it for the string values rendered
in vulnsJson.jsp.
@summitt summitt merged commit 08efe07 into main May 26, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant