Skip to content

Commit f712593

Browse files
committed
fix: removed a possibly dossy regex
1 parent eb9b3b6 commit f712593

File tree

9 files changed

+5
-26
lines changed

9 files changed

+5
-26
lines changed

dist/purify.cjs.js

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.cjs.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.es.mjs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -821,11 +821,6 @@ function createDOMPurify() {
821821
// Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
822822
dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
823823
}
824-
// Due to chrome bug with DOMParser and <meta> tags, scrub them first
825-
for (let previousDirty; previousDirty !== dirty;) {
826-
previousDirty = dirty;
827-
dirty = dirty.replace(/<meta[^>]*>/gi, '');
828-
}
829824
const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
830825
/*
831826
* Use the DOMParser API by default, fallback later if needs be

dist/purify.es.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.js

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/purify.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/purify.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -904,12 +904,6 @@ function createDOMPurify(window: WindowLike = getGlobal()): DOMPurify {
904904
'</body></html>';
905905
}
906906

907-
// Due to chrome bug with DOMParser and <meta> tags, scrub them first
908-
for (let previousDirty; previousDirty !== dirty; ) {
909-
previousDirty = dirty;
910-
dirty = dirty.replace(/<meta[^>]*>/gi, '');
911-
}
912-
913907
const dirtyPayload = trustedTypesPolicy
914908
? trustedTypesPolicy.createHTML(dirty)
915909
: dirty;

0 commit comments

Comments
 (0)