(tagName)
| 1807 | const expected = DOMPurify.sanitize(dirty, outer(/^foo-/)); |
| 1808 | |
| 1809 | const nesting = (tagName) => { |
| 1810 | DOMPurify.sanitize('<a href="https://x.test/">n</a>'); |
| 1811 | return /^foo-/.test(tagName); |
| 1812 | }; |
| 1813 | assert.strictEqual(DOMPurify.sanitize(dirty, outer(nesting)), expected); |
| 1814 | } |
| 1815 | ); |