Browse Source

fix issue #7366 render custom html element as hiccup no longger working. dompurify remove `is` attribute from hiccup

Darwis 2 years ago
parent
commit
7a508dde0a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/frontend/security.cljs

+ 2 - 1
src/main/frontend/security.cljs

@@ -3,7 +3,8 @@
   (:require ["dompurify" :as DOMPurify]))
   (:require ["dompurify" :as DOMPurify]))
 
 
 (def sanitization-options (clj->js {:ADD_TAGS ["iframe"]
 (def sanitization-options (clj->js {:ADD_TAGS ["iframe"]
-                                    :ALLOW_UNKNOWN_PROTOCOLS true}))
+                                    :ALLOW_UNKNOWN_PROTOCOLS true
+                                    :ALLOWED_ATTR ["is"]}))
 
 
 (defn sanitize-html
 (defn sanitize-html
   [html]
   [html]