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

Function _createTrustedHTML

src/purify.ts:315–324  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

313 };
314
315 const _createTrustedHTML = function (html: string): string {
316 _assertNotInTrustedTypesPolicy();
317
318 IN_TRUSTED_TYPES_POLICY++;
319 try {
320 return trustedTypesPolicy.createHTML(html);
321 } finally {
322 IN_TRUSTED_TYPES_POLICY--;
323 }
324 };
325
326 /* Sign string output when a policy is active and the caller asked for it */
327 const _signOutput = function (html: string): string {

Callers 4

_signOutputFunction · 0.85
_parseConfigFunction · 0.85
_initDocumentFunction · 0.85

Calls 1

Tested by

no test coverage detected