Bug description

Problem Description

When MySQL table data contains angle bracket tags (e.g., <Buddhist Blue Duck-No Giblets>), both: - SQL Lab query results - Table visualizations display truncated content despite the complete data existing in the database.

Reproduction Steps

  1. Connect to MySQL 5.7.28 database (with utf8mb4 charset)
  2. Execute query on a TEXT or VARCHAR(100) column containing angle brackets: ```sql SELECT example_column FROM sample_table WHERE id = 1; -- Actual data: ""

I installed Superset using Conda superset version:2.0.1 and 4.0 Database MySQL 5.7.28 Column types: TEXT and VARCHAR(100) Confirmed DEFAULT CHARSET = utf8mb4

Screenshots/recordings

Image

Superset version

4.1.2

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

Hi @SukiSeven! I'm Dosu and I’m helping the superset team.

This is a frontend rendering issue: when your data contains angle brackets (like <Buddhist Blue Duck-No Giblets>), Superset's Table visualization and likely SQL Lab try to detect if the value is HTML. If a string contains angle brackets, it may be misclassified as HTML and rendered using dangerouslySetInnerHTML. If the value isn't valid HTML, the browser can hide or drop the content inside the angle brackets, making it look truncated—even though the full data is present in the backend and database. This is a browser rendering side effect, not a backend or database truncation issue.

You can work around this by disabling HTML rendering for the affected columns (set allowRenderHtml to false in the Table visualization's column config, if available), or by preprocessing your data to escape angle brackets (e.g., replace < with &lt; and > with &gt;). This will ensure the data is always treated as plain text and displayed in full. The backend passes the data through unchanged; the issue is isolated to frontend logic and browser rendering. More details on the frontend logic can be found in the TableChart and HTML utility code (source, source).

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

Comment From: SukiSeven

@dosu

I have already tried replacing < with < and > with >, but the issue persists. Since I installed Superset using Conda, could anyone please advise where I should go to disable this behavior?

Comment From: dosubot[bot]

This behavior is controlled by the Table visualization's frontend code, not by a Conda-specific setting or a config file. To disable HTML rendering (and prevent truncation of values with angle brackets), you need to edit the file superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx and set the allowRenderHtml property to false instead of true in the TableChart component. This will force all table cells to render as plain text, regardless of their content (reference).

After making this change, rebuild the frontend assets. In your Superset environment (even if installed via Conda), go to the superset-frontend directory and run:

npm ci
npm run build

or use the provided script:

./js_build.sh

This will update the frontend with your change. No extra steps are needed for Conda installations—the frontend build process is the same as with any other install method (reference).

There is currently no user-facing toggle for this behavior in the UI or config files. If you want this to be configurable per chart or column in the future, you might consider requesting it as a feature.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

Comment From: SukiSeven

@dosu The method you provided is to download the frontend configuration to the server, but I used conda for installation and don't recall downloading any frontend configuration.

Comment From: rusackas

For tables, you can (probably?) resolve this by disabling the "Render Columns in HTML Format" option.

Image

For SQL Lab, you can (probably?) resolve this by disabling the Render HTML option

Image