GitHub user dosubot[bot] added a comment to the discussion: Superset V6.0 - 
Table chart now longer shows bold text with HTML <b> tag in columns

<!-- Answer -->
There isn’t a supported way to turn off HTML sanitization in Superset 6.0 
table/chart cells. Even with “Render columns in HTML format” enabled, only tags 
on the sanitizer’s whitelist (like `<span>`, `<img>`, `<a>`, etc.) will be 
rendered—`<b>` is not included, so it gets stripped or escaped for security 
reasons 
[reference](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/src/utils/html.tsx).

If you need bold formatting, you can update your database text to use `<span 
style="font-weight:bold">` instead of `<b>`, since `<span>` with inline styles 
is allowed and will render as bold in the table 
[reference](https://github.com/apache/superset/discussions/35000#discussioncomment-14325257).

Disabling or bypassing this sanitization would require modifying the frontend 
source code and rebuilding, which is not recommended due to significant 
security risks [reference](https://github.com/apache/superset/issues/35182). If 
you want help with safe formatting options, let me know!


<!-- 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/66a542cf-b8a2-4039-b216-a99f9853bf21?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/66a542cf-b8a2-4039-b216-a99f9853bf21?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/66a542cf-b8a2-4039-b216-a99f9853bf21?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/66a542cf-b8a2-4039-b216-a99f9853bf21?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/66a542cf-b8a2-4039-b216-a99f9853bf21?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/66a542cf-b8a2-4039-b216-a99f9853bf21?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/66a542cf-b8a2-4039-b216-a99f9853bf21?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=There%20isn%E2%80%99t%20a%20supported%20way%20to%20turn%20off%20HTML%20sanitization%20in%20Superset%206.0%20table/chart%20cells.%20Even%20with%20%E2%80%9CRender%20columns%20in%20HTML%20format%E2%80%9D%20enabled%2C%20only%20tags%20on%20the%20sanitizer%E2%80%99s%20whitelist%20%28like%20%60%3Cspan%3E%60%2C%20%60%3Cimg%3E%60%2C%20%60%3Ca%3E%60%2C%20etc.%29%20will%20be%20rendered%E2%80%94%60%3Cb%3E%60%20is%20not%20included%2C%20so%20it%20gets%20stripped%20or%20escaped%20for%20security%20reasons%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/src/utils/html.tsx%29.%0A%0AIf%20you%20need%20bold%20formatting%2C%20you%20can%20update%20your%20database%20text%20to%20use%20%60%3Cspan%20style%3D%22
 
font-weight%3Abold%22%3E%60%20instead%20of%20%60%3Cb%3E%60%2C%20since%20%60%3Cspan%3E%60%20with%20inline%20styles%20is%20allowed%20and%20will%20render%20as%20bold%20in%20the%20table%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/discussions/35000%23discussioncomment-14325257%29.%0A%0ADisabling%20or%20bypassing%20this%20sanitization%20would%20require%20modifying%20the%20frontend%20source%20code%20and%20rebuilding%2C%20which%20is%20not%20recommended%20due%20to%20significant%20security%20risks%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/issues/35182%29.%20If%20you%20want%20help%20with%20safe%20formatting%20options%2C%20let%20me%20know%21)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![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/supers
 et/discussions/36799)

GitHub link: 
https://github.com/apache/superset/discussions/36799#discussioncomment-15326647

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to