MCPcopy Index your code
hub / github.com/cure53/DOMPurify / commentHeavy

Function commentHeavy

scripts/benchmark.js:128–139  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

126}
127
128function commentHeavy(n) {
129 // Comments with and without markup-significant payloads: exercises
130 // the SAFE_FOR_XML comment probe.
131 let html = '';
132 for (let i = 0; i < n; i++) {
133 html += `<!-- plain comment number ${i} -->`;
134 html += `<span>between ${i}</span>`;
135 html += `<!-- tricky <b>payload ${i}</b> -->`;
136 }
137
138 return html;
139}
140
141function svgMath(n) {
142 // Foreign-content blocks: exercises _checkValidNamespace dispatch.

Callers 1

benchmark.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…