You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Web Console decodes HTML entities in results, corrupting displayed and copied values #587
The web console runs every result cell through unescapeHtml() before rendering, and the copy paths reuse the same text. But the server does not HTML-encode values in /exec JSON responses, so any stored value that legitimately contains an entity sequence (&, <, >, ", ', ) is silently altered, both in the grid display and in the copied value.
This affects the legacy grid (src/js/console/grid.js), the new ResultGrid (src/components/ResultGrid/inlineGridUtils.ts), and the markdown copy (src/components/ResultGrid/resultPageMarkdown.ts).
fix: render HTML entities in grid cells after XSS fix #525 then added unescapeHtml() on top, on the assumption that the server sends HTML entities. As far as I can tell from /exec responses on 9.4.3 it doesn't, so the unescape only ever fires on user data that happens to look like an entity.
Realistic hits: URL query strings stored after HTML-escaping upstream, HTML fragments in varchar columns, scraped or event payloads.
If some older server versions do escape entities in query responses (which would explain #525), the unescape would need to be gated on that rather than applied unconditionally.
Happy to submit a PR removing the unconditional unescape (grid.js, inlineGridUtils, resultPageMarkdown, plus their tests) if you can confirm the intended behavior.
Activity
emrberk commentedon Jul 16, 2026
Hey @felmonon,
Thanks for reporting the issue. You can see the server-side and client-side fixes for the issue.