fix: render HTML entities in grid cells after XSS fix#525
Merged
bluestreak01 merged 3 commits intomainfrom Jan 11, 2026
Merged
Conversation
After the XSS fix switched from innerHTML to textContent, HTML entities sent by the server (like ) were displayed as literal text instead of being rendered as actual characters. Added unescapeHtml function to decode common HTML entities while maintaining XSS protection. Co-Authored-By: Claude Opus 4.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
unescapeHtmlfunction to decode HTML entities ( ,<,>, etc.) to their actual charactersunescapeHtmlto grid cell content before settingtextContent sequences from server displayed as literal text instead of spacesContext
The XSS fix (#519) correctly switched grid cells from
innerHTMLtotextContentfor security. However, this broke rendering of HTML entities that the server sends (e.g., for non-breaking spaces). This PR restores proper entity rendering while maintaining XSS protection.Test plan
<,>,&,") render as their corresponding characters🤖 Generated with Claude Code