Closed AnjuDevkota closed 1 year ago
DOMPurify will always "heal" HTML which means it also fixes quotes and changes them to double-quotes. You need to employ proper escaping and handle the output correctly, not our bug :)
Closing this for now as there is nothing to fix
i have input like test. it is a json value. but i am getting test after sanitization. that means i am getting double quote on href by using dompurify. and the problem is i need to pass this value in Json so it becomes " test", which cause bad format json. here is my code
const sanitizedHtml = DOMPurify.sanitize(modifiedHtml, { ADD_TAGS: allowedTagsWithUnderscore });
![Uploading image.png…]()