Skip to content
Snippets Groups Projects
Commit 9d6504c2 authored by dakkar's avatar dakkar
Browse files

allow styles on any element when sanitizing html - fixes #538

this applies to instance description and server rules
parent 42d82796
No related branches found
No related tags found
2 merge requests!9272025.2.2,!863allow styles on any element when sanitizing html - fixes #538
Pipeline #2280 passed with stage
in 9 minutes and 52 seconds
......@@ -13,6 +13,7 @@ export default function sanitizeHtml(str: string | null): string | null {
...original.defaults.allowedAttributes,
a: original.defaults.allowedAttributes.a.concat(['style']),
img: original.defaults.allowedAttributes.img.concat(['style']),
'*': (original.defaults.allowedAttributes['*'] || []).concat(['style']),
},
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment