1
0
mirror of https://github.com/dkmstr/openuds-gui.git synced 2024-12-21 13:33:48 +03:00

Also removed "on"

This commit is contained in:
Adolfo Gómez García 2024-08-17 19:41:53 +02:00
parent 9cccd96725
commit f7ca133cf5
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -17,7 +17,7 @@ export class SafeHtmlPipe implements PipeTransform {
// 'onmousemove', 'onmouseenter', 'onmouseleave', 'onmouseup',
// 'onmousedown', 'onkeyup', 'onkeydown', 'onkeypress', 'onkeydown',
// 'onkeypress', 'onkeyup', 'onchange', 'onfocus', 'onblur', 'onload', 'onunload', 'onabort', 'onerror', 'onresize', 'onscroll'
value = value.replace(/on\w+\s*=\s*['"]?[^'"]*['"]?/gi, '');
value = value.replace(/(on|(on\w+\s*))=\s*['"]?[^'"]*['"]?/gi, '');
// Remove if exists any javascript: reference
value = value.replace(/javascript\s*\:/gi, '');