Allow any HTML in Label generator (which makes it possible to fully customize the labels)

This commit is contained in:
Jan Böhmer 2022-09-25 00:47:53 +02:00
parent d58159f181
commit 767bf763b8

View file

@ -207,6 +207,27 @@ Editor.defaultConfig = {
],
supportAllValues: true
},
// Allow all HTML features for our labels
htmlSupport: {
allow: [
{
name: /.*/,
attributes: true,
classes: true,
styles: true
}
],
disallow: [
//Some rudimentary protection against XSS, even if it is not really needed as this is only parsed by DOMHTML which does not support any kind of script execution.
{
name: /^(head|body|html|script)$/i,
},
{
name: /.*/,
attributes: /^on.*/i
}
]
},
image: {
toolbar: [
'imageTextAlternative',