From 756cfc027696901f0afc9b84bb439c67c8b620ad Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 22 May 2022 13:11:38 -0400 Subject: Use \f rather than \x0C for whitespace form feed (#2158) --- ext/js/dom/sandbox/css-style-applier.js | 3 +-- ext/js/dom/simple-dom-parser.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'ext') diff --git a/ext/js/dom/sandbox/css-style-applier.js b/ext/js/dom/sandbox/css-style-applier.js index 6c45f13e..0f44df0a 100644 --- a/ext/js/dom/sandbox/css-style-applier.js +++ b/ext/js/dom/sandbox/css-style-applier.js @@ -53,8 +53,7 @@ class CssStyleApplier { this._styleDataUrl = styleDataUrl; this._styleData = []; this._cachedRules = new Map(); - // eslint-disable-next-line no-control-regex - this._patternHtmlWhitespace = /[\t\r\n\x0C ]+/g; + this._patternHtmlWhitespace = /[\t\r\n\f ]+/g; this._patternClassNameCharacter = /[0-9a-zA-Z-_]/; } diff --git a/ext/js/dom/simple-dom-parser.js b/ext/js/dom/simple-dom-parser.js index bc327f5e..f5489d5e 100644 --- a/ext/js/dom/simple-dom-parser.js +++ b/ext/js/dom/simple-dom-parser.js @@ -22,8 +22,7 @@ class SimpleDOMParser { constructor(content) { this._document = parse5.parse(content); - // eslint-disable-next-line no-control-regex - this._patternHtmlWhitespace = /[\t\r\n\x0C ]+/g; + this._patternHtmlWhitespace = /[\t\r\n\f ]+/g; } getElementById(id, root=null) { -- cgit v1.2.3