Skip to content

fix: render HTML entities in grid cells after XSS fix#525

Merged
bluestreak01 merged 3 commits intomainfrom
vi_fix_nbsp
Jan 11, 2026
Merged

fix: render HTML entities in grid cells after XSS fix#525
bluestreak01 merged 3 commits intomainfrom
vi_fix_nbsp

Conversation

@bluestreak01
Copy link
Copy Markdown
Member

@bluestreak01 bluestreak01 commented Jan 9, 2026

Summary

  • Added unescapeHtml function to decode HTML entities ( , <, >, etc.) to their actual characters
  • Applied unescapeHtml to grid cell content before setting textContent
  • Fixes regression where   sequences from server displayed as literal text instead of spaces

Context

The XSS fix (#519) correctly switched grid cells from innerHTML to textContent for 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

  • Verify grid cells display non-breaking spaces correctly when server sends  
  • Verify other HTML entities (<, >, &, ") render as their corresponding characters
  • Confirm XSS protection still works (malicious scripts in cell data should not execute)

🤖 Generated with Claude Code

bluestreak01 and others added 3 commits January 9, 2026 21:01
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]>
@bluestreak01 bluestreak01 merged commit 17fe0f3 into main Jan 11, 2026
3 checks passed
@bluestreak01 bluestreak01 deleted the vi_fix_nbsp branch January 11, 2026 23:03
@emrberk emrberk mentioned this pull request Jan 13, 2026
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