(html)
| 1193 | // A reparse drops the inner <form> tag and joins the text around it |
| 1194 | const dirty = '<form><div>{</form><form>{x}</form>}'; |
| 1195 | const reparsedText = (html) => { |
| 1196 | const div = document.createElement('div'); |
| 1197 | div.innerHTML = html; |
| 1198 | return div.textContent; |
| 1199 | }; |
| 1200 | |
| 1201 | const clean = DOMPurify.sanitize(dirty, { SAFE_FOR_TEMPLATES: true }); |
| 1202 | assert.notOk(/{{|}}/.test(reparsedText(clean))); |