Skip to content
Snippets Groups Projects
Commit 36b7572b authored by dakkar's avatar dakkar
Browse files

merge: allow styles on any element when sanitizing html - fixes #538 (!863)

View MR for information: TransFem-org/Sharkey!863



Closes #538

Approved-by: default avatarHazelnoot <acomputerdog@gmail.com>
Approved-by: default avatarMarie <github@yuugi.dev>
parents 9fe0eb5e 9d6504c2
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 #2289 canceled with stages
in 11 minutes and 8 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