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

Function link

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

Source from the content-addressed store, hash-verified

8788 'parse-time template expansion neutralizes weaponized payloads',
8789 (assert) => {
8790 const link = (id, content) =>
8791 `<div><?marker name="${id}"></div>` +
8792 `<template for="${id}">${content}</template>`;
8793 const cases = {
8794 'img onerror': link('a', '<img src=x onerror=alert(1)>'),
8795 script: link('b', '<script>alert(1)<\/script>'),

Callers 1

test-suite.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected