dosubot[bot] commented on issue #30381:
URL: https://github.com/apache/superset/issues/30381#issuecomment-2372571121

   <!-- Answer -->
   The issue you're encountering with the `class` attribute being blank is 
likely due to the fact that the `xss` library, which is used for HTML 
sanitization in Superset, does not recognize the `className` attribute. 
Instead, it uses the `class` attribute.
   
   To resolve this, you should update your 
`HTML_SANITIZATION_SCHEMA_EXTENSIONS` configuration to use the `class` 
attribute instead of `className`. Here is the corrected configuration:
   
   ```python
   HTML_SANITIZATION = True
   HTML_SANITIZATION_SCHEMA_EXTENSIONS = {
       "attributes": {
           "*": ["style", "class"],
       },
       "tagNames": ["style"],
   }
   ```
   
   With this configuration, the `class` attribute should be preserved in the 
processed HTML template, allowing your CSS to be applied correctly.
   
   Make sure to restart Superset after making these changes to ensure the new 
configuration is loaded.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to