dm-p / powerbi-visuals-html-content

Visualise column or measure values as HTML in your Power BI reports. Intended as a spiritual successor to the OG HTML Viewer custom visual, with some extra stuff thrown in.
MIT License
85 stars 18 forks source link

[BUG] class attribute does not pass sanitization in certified visual #88

Closed dm-p closed 8 months ago

dm-p commented 1 year ago

Describe the bug

In HTML Content (lite), class attributes are getting removed from the resulting HTML, which means that custom CSS is much harder to get working when it shouldn't really matter.

To Reproduce

Steps to reproduce the behavior:

  1. Create a measure containing class atribtues, e.g.:
    Material Symbols Test = "
    <span style=""color:red;"" class='material-symbols-outlined'>search</span>
    <span class='material-symbols-outlined'>home</span>
    <span class='material-symbols-outlined'>settings</span>
    <span class='material-symbols-outlined'>favorite</span>
    "
  2. Add this to the visual.
  3. Resulting HTML is rendered without class attributes

Expected behavior

Rendered content should be as per the measure.

Screenshots/Workbook

image