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

Function link

test/test-suite.js:6790–6792  ·  view source on GitHub ↗
(id, content)

Source from the content-addressed store, hash-verified

6788 'parse-time template expansion neutralizes weaponized payloads',
6789 (assert) => {
6790 const link = (id, content) =>
6791 `<div><?marker name="${id}"></div>` +
6792 `<template for="${id}">${content}</template>`;
6793 const cases = {
6794 'img onerror': link('a', '<img src=x onerror=alert(1)>'),
6795 script: link('b', '<script>alert(1)<\/script>'),

Callers 1

test-suite.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected