Skip to content

Decode special characters when copying grid cells #320

Closed

Description

@insmac

Currently, if the value of a given cell contains special characters (i.e. <, > or &), they will be copied in their HTML-encoded form, thus preventing using the value for things like SQL filters.

The cell value should be decoded upon writing its contents to the clipboard.

Steps to replicate:

CREATE TABLE chars (char string);
INSERT INTO chars (char) VALUES ('&');
INSERT INTO chars (char) VALUES ('<');
INSERT INTO chars (char) VALUES ('>');
SELECT * FROM chars;

Then, copy any cell to clipboard and paste elsewhere.

Activity

  1. added
    bug
    web-console
    on Jul 7, 2025
  2. omsuneri commented on Aug 12, 2025

    @omsuneri
    Contributor

    @emrberk can I work on this please assign me !!

  3. felmonon commented on Jul 14, 2026

    @felmonon

    Tested this against current main and the deployed console on demo.questdb.io (console 2.0.0, QuestDB 9.4.3): the repro from the description no longer reproduces. Copied cell values match the displayed text for &, < and >.

    The copy path used to read focusedCell.innerHTML while the cell content was HTML-escaped client-side; #519 removed the client-side escaping and switched both rendering and copy to textContent, which fixed this as a side effect. Looks like this one can be closed.

    While verifying I ran into the opposite problem: values that legitimately contain entity sequences (e.g. a stored a=1&amp;b=2) get decoded on display and copy. Filed separately as #587.

  4. emrberk commented on Jul 31, 2026

    @emrberk
    Member

    Closing the issue, it is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Severity: 2bugweb-console

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions