You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/07/06 23:40:48 UTC

[PR] test(superset-ui-core): prove angle-bracketed non-HTML values render as text (#34082) [superset]

rusackas opened a new pull request, #41829:
URL: https://github.com/apache/superset/pull/41829

   ### SUMMARY
   
   Test-only PR that proves issue #34082 (MySQL data values wrapped in angle brackets, e.g. `<Buddhist Blue Duck-No Giblets>`, appearing truncated in SQL Lab and Table chart results) is already fixed on master.
   
   The truncation happened because such values were misdetected as HTML and sanitized away. On master, `isProbablyHTML` in `superset-frontend/packages/superset-ui-core/src/utils/html.tsx` only treats a string as HTML when it matches a known HTML tag-name allowlist (`KNOWN_HTML_TAGS` / `HTML_TAG_PATTERN`), so angle-bracketed data values like the one from the issue fall through as plain text. This PR encodes that behavior in the existing `html.test.tsx` suite:
   
   - `isProbablyHTML('<Buddhist Blue Duck-No Giblets>')`, `isProbablyHTML('<Roasted Chicken-Whole>')`, and the same value embedded in surrounding text all return `false`
   - `safeHtmlSpan` and `sanitizeHtmlIfNeeded` return the raw string untouched for such values, so nothing is swallowed when rendering results
   
   These tests pass on current master, so the regression guard is green from day one; a future change that loosens the HTML detection back to swallowing arbitrary `<...>` values will fail them.
   
   closes #34082
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A (test-only change)
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   cd superset-frontend
   npm run test -- packages/superset-ui-core/src/utils/html.test.tsx --maxWorkers=2
   ```
   
   All 42 tests in the suite pass, including the two new cases.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   - [x] Has associated issue: closes #34082
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] test(superset-ui-core): prove angle-bracketed non-HTML values render as text (#34082) [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #41829:
URL: https://github.com/apache/superset/pull/41829


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] test(superset-ui-core): prove angle-bracketed non-HTML values render as text (#34082) [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41829:
URL: https://github.com/apache/superset/pull/41829#issuecomment-4898612912

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] test(superset-ui-core): prove angle-bracketed non-HTML values render as text (#34082) [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41829:
URL: https://github.com/apache/superset/pull/41829#issuecomment-4899103406

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41829?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 64.78%. Comparing base ([`9e50d9e`](https://app.codecov.io/gh/apache/superset/commit/9e50d9eca674c8bcd033e6617fcb7943cd02e252?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7111985`](https://app.codecov.io/gh/apache/superset/commit/71119857dd62656c380a22e28b81eb63b2555701?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 4 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #41829   +/-   ##
   =======================================
     Coverage   64.78%   64.78%           
   =======================================
     Files        2689     2689           
     Lines      148936   148936           
     Branches    34365    34365           
   =======================================
     Hits        96481    96481           
     Misses      50690    50690           
     Partials     1765     1765           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/41829/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/41829/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `69.66% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/41829?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org