DOM.purify toast if HTML is allowed

This commit is contained in:
Wolfsblvt 2024-09-06 20:31:13 +02:00
parent 0d9843cdd6
commit 25d8286dfc

View File

@ -2251,6 +2251,11 @@ async function echoCallback(args, value) {
}
}
// If we allow HTML, we need to sanitize it to prevent security risks
if (!options.escapeHtml) {
value = DOMPurify.sanitize(value, { FORBID_TAGS: ['style'] });
}
let toast;
switch (severity) {
case 'error':