Hi,
We are using the this library in Zimbra to sanitize customer-generated HTML content in emails. During this process, we encountered an issue where a
tag inside a
tag causes improper sanitization. Specifically:
The sanitizer closes the
tag before the
tag and reopens it after the
.
The
tag does not close where it originally should; instead, it closes just before the end of the HTML document.
It seems that the sanitizer uses a stack to manage tags and the
tag remains in the stack until all other tags are processed, causing it to close at the end of the document.
Before Sanitization
`
Ważna uwaga dotycząca usługi: wsparcie dla sprzętu wygasło
At the end of the document the missing div tag is getting closed there's two div tag in the HTML document both get's closed at end like this
` </div></div></td></tr></tbody></table>
Hi, We are using the this library in Zimbra to sanitize customer-generated HTML content in emails. During this process, we encountered an issue where a
Before Sanitization `
`
After sanitization
`