From 3f1d6a5459731272da5f8ad0064d15194913a241 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 1 Jul 2024 09:30:26 +1200 Subject: [PATCH] Re-enable DOMPurify cleaning --- client/homebrew/brewRenderer/brewRenderer.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 129fdf2cf..23a683ecb 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -40,7 +40,7 @@ const BrewPage = (props)=>{ index : 0, ...props }; - const cleanText = props.contents; //DOMPurify.sanitize(props.contents, purifyConfig); + const cleanText = DOMPurify.sanitize(props.contents, purifyConfig); return
; @@ -129,7 +129,7 @@ const BrewRenderer = (props)=>{ const renderStyle = ()=>{ if(!props.style) return; - const cleanStyle = props.style; //DOMPurify.sanitize(props.style, purifyConfig); + const cleanStyle = DOMPurify.sanitize(props.style, purifyConfig); //return
@layer styleTab {\n${sanitizeScriptTags(props.style)}\n} ` }} />; return
${cleanStyle} ` }} />; };