goldjee commented on issue #30381:
URL: https://github.com/apache/superset/issues/30381#issuecomment-2375307834

   Hi, @sfirke! I've modified `HTML_SANITIZATION_SCHEMA_EXTENSIONS` and added 
Talisman config like this:
   ```Python
   HTML_SANITIZATION = True
   HTML_SANITIZATION_SCHEMA_EXTENSIONS = {
     "attributes": {
       "*": ["style", "className", "class", "src", "width", "height", 
"frameborder", "marginwidth", "marginheight", "scrolling", "target"],
     },
     "tagNames": ["style", "iframe", "h1", "h2", "h3", "h4", "h5", "h6"],
   }
   
   TALISMAN_ENABLED = True
   TALISMAN_CONFIG = {
       "content_security_policy": {
           "default-src": ["'self'", "'unsafe-inline'", "'unsafe-eval'"]
       }
   }
   ```
   
   I can see updated schema extensions at the client side:
   <img width="519" alt="image" 
src="https://github.com/user-attachments/assets/97f0dcea-b312-4fbb-8c24-d0d7cc784e98";>
   
   However, these adjustments didn't do the trick for me. The `class` attribute 
is still empty.
   
   <img width="1066" alt="image" 
src="https://github.com/user-attachments/assets/15158ea0-480a-4b4e-aa9f-e492b3084321";>
   
   I've also noticed an error in the browser console:
   ```
   Uncaught NetworkError: Failed to execute 'importScripts' on 
'WorkerGlobalScope': The script at 
'http://localhost:8088/static/assets/worker-css.js' failed to load.
       at 408b31b0-bd74-41d2-bcda-02d1e74d554e:1:1
   ```
   Wonder if it has something to do with the missing attribute.


-- 
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