run stripTags twice to ensure allowed tags are still respected#71
Conversation
I'm not quite sure I can follow. Wouldn't the event handler here be filtered out the same as in "<img alt="x" onerror..." (by the code that checks whether the attribute starts with "on")? Currently, the While having a closer look at the function now, we found another unrelated way to bypass it: While the special characters are removed when the href attribute is set, the check afterwards is case-sensitive while the URI scheme is not. Overall it might also be a good idea to switch from the custom phpjs-strip_tags-based implementation to a fully-featured and maintained library: https://www.npmtrends.com/dompurify-vs-sanitize-html-vs-xss I took a stab at replicating the current behavior using Output: |
No description provided.