MCPcopy Create free account
hub / github.com/cure53/DOMPurify / chain

Function chain

test/test-suite.js:6584–6591  ·  view source on GitHub ↗
(leaf, links)

Source from the content-addressed store, hash-verified

6582 (assert) => {
6583 const bs = '<b>'.repeat(96);
6584 const chain = (leaf, links) => {
6585 let s = '<div><?marker name="x1"></div>';
6586 for (let i = 1; i <= links; i++) {
6587 const next = i < links ? `<?marker name="x${i + 1}">` : leaf;
6588 s += `<template for="x${i}">${bs}${next}</template>`;
6589 }
6590 return s;
6591 };
6592 const leaf =
6593 '<math><mtext><style><img src=x onerror=alert(1)></style></mtext></math>';
6594 for (const links of [4, 6, 8]) {

Callers 1

test-suite.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected