0.57.0.json

[
  {
    "path": "package/esm/vs/base/browser/domSanitize.js",
    "hits": [
      "4: import purify from './dompurify/dompurify.js';",
      "124:  * Hooks dompurify using `afterSanitizeAttributes` to check link and media-loading attributes.",
      "127:     purify.addHook('afterSanitizeAttributes', (node) => {",
      "161:     // We sanitize the src/href attributes later if needed",
      "167:  * @param untrusted The HTML string to sanitize.",
      "170:  * @returns A sanitized string of html.",
      "172: function sanitizeHtml(untrusted, config) {",
      "195:         // All attr names are lower-case in the sanitizer hooks",
      "225:             purify.addHook('uponSanitizeElement', replaceWithPlainTextHook);",
      "228:             purify.addHook('uponSanitizeAttribute', (node, e) => {",
      "246:             return sanitizeSurvivingStalePolicy(untrusted, { ...resolvedConfig, RETURN_DOM_FRAGMENT: true });",
      "249:             return sanitizeSurvivingStalePolicy(untrusted, { ...resolvedConfig, RETURN_TRUSTED_TYPE: true }); // Cast from lib TrustedHTML to global TrustedHTML",
      "253:         purify.removeAllHooks();",
      "259:  * Sanitizes HTML, replacing the sanitizer's Trusted Types policy first when the policy's",
      "263:  * Exported, with `sanitize` injectable, only so a test can drive the recovery: dompurify",
      "264:  * caches one policy for the lifetime of the module, so once anything has sanitized, no",
      "265:  * later stand-in policy is ever consulted. Prefer {@link sanitizeHtml}.",
      "267: function sanitizeSurvivingStalePolicy(untrusted, config, sanitize = (html, cfg) => purify.sanitize(html, cfg)) {",
      "269:         return sanitize(untrusted, config);",
      "282:         // Named through dompurify's own config rather than the global `TrustedTypePolicy`.",
      "286:         return sanitize(untrusted, { ...config, TRUSTED_TYPES_POLICY: policy });",
      "294: const replaceWithPlainTextHook = (node, data, _config) => {",
      "299:                 // Workaround for https://github.com/cure53/DOMPurify/issues/1005",
      "355: export { basicMarkupHtmlTags, convertTagToPlaintext, defaultAllowedAttrs, safeSetInnerHtml, sanitizeHtml, sanitizeSurvivingStalePolicy };"
    ]
  },
  {
    "path": "package/esm/vs/base/browser/markdownRenderer.js",
    "hits": [
      "16: import { basicMarkupHtmlTags, safeSetInnerHtml, convertTagToPlaintext, sanitizeHtml } from './domSanitize.js';",
      "178:     const sanitizerConfig = getDomSanitizerConfig(markdown, options.sanitizerConfig ?? {});",
      "179:     safeSetInnerHtml(renderedContent, renderedMarkdown, sanitizerConfig);",
      "259:             if (options.sanitizerConfig?.replaceWithPlaintext) {",
      "430:         // Note: we always pass the output through dompurify after this so that we don't rely on",
      "433:             if (options.sanitizerConfig?.replaceWithPlaintext) {",
      "565: function sanitizeRenderedMarkdown(renderedMarkdown, originalMdStrConfig, options = {}) {",
      "566:     const sanitizerConfig = getDomSanitizerConfig(originalMdStrConfig, options);",
      "567:     return sanitizeHtml(renderedMarkdown, sanitizerConfig);",
      "649:         // Since we have our own sanitize function for marked, it's possible we missed some tag so let dompurify make sure.",
      "694:     return sanitizeRenderedMarkdown(html, { isTrusted: false }, {})",
      "965:     // `<body>...</body>` (so dompurify keeps leading comments), which leaves"
    ]
  }
]
← All docsView source on GitHub →