Skip to content

Commit

Permalink
Also removed "on"
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmstr committed Aug 17, 2024
1 parent 9cccd96 commit f7ca133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/helpers/safe-html.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, '');
Expand Down

0 comments on commit f7ca133

Please sign in to comment.