dosubot[bot] commented on issue #33771: URL: https://github.com/apache/superset/issues/33771#issuecomment-2971914562
<!-- Answer --> This is a known limitation in how Drill by works with columns containing HTML, such as <a> tags. The root cause is that when you use Drill by on a table cell, Superset passes the raw SQL value (which includes the HTML markup) as the filter value, rather than the plain text label that’s displayed to users. Since the filter value includes the HTML, it doesn’t match the expected values in the dataset, so no results are shown. The table chart does sanitize and render HTML for display, but the Drill by logic doesn’t strip HTML before filtering, which causes this disconnect [reference](https://github.com/apache/superset/blob/21d8d57380bcc67bab8e603fda99ffbc4a7dcac2/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx). There isn’t a built-in workaround right now. To address this, the code that handles Drill by/context menu events should strip HTML tags from the filter value before applying the filter. The codebase already includes utilities for HTML sanitization and tag removal, so this would be a straightforward fix for a developer familiar with the frontend code [reference](https://github.com/apache/superset/blob/21d8d57380bcc67bab8e603fda99ffbc4a7dcac2/superset-frontend/plugins/plugin-chart-table/src/utils/formatValue.ts). No existing tickets or documentation specifically address this scenario, but the technical root cause is clear from the code. If you need to use Drill by on these columns, you’ll need to avoid embedding HTML in the dimension values, or consider a code change to strip HTML before filtering. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/231859ef-27bf-43dc-83e8-c9f01be6d32f?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/231859ef-27bf-43dc-83e8-c9f01be6d32f?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/231859ef-27bf-43dc-83e8-c9f01be6d32f?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/231859ef-27bf-43dc-83e8-c9f01be6d32f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/231859ef-27bf-43dc-83e8-c9f01be6d32f?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/231859ef-27bf-43dc-83e8-c9f01be6d32f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/231859ef-27bf-43dc-83e8-c9f01be6d32f?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [! [Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/33771) -- 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-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org