diff --git a/src/client/utils/html.js b/src/client/utils/html.js index 1cb877eab..1f2a2909e 100644 --- a/src/client/utils/html.js +++ b/src/client/utils/html.js @@ -6,6 +6,7 @@ import { remove as removeProcessingHeader } from '../../processing/script/header import styleProcessor from '../../processing/style'; import { find, getTagName, isScriptElement } from './dom'; import { convertToProxyUrl, parseProxyUrl } from './url'; +import { isIE, isMSEdge } from './browser'; import { hasIsNotClosedFlag } from '../sandbox/node/document/writer'; import * as urlResolver from './url-resolver'; import INTERNAL_PROPS from '../../processing/dom/internal-properties'; @@ -26,6 +27,9 @@ const WRAP_DOCTYPE_RE = /]*)>/ig; const WRAP_DOCTYPE_TEMPLATE = `<${ FAKE_DOCTYPE_TAG_NAME }>$1`; const UNWRAP_DOCTYPE_RE = new RegExp(`<${ FAKE_DOCTYPE_TAG_NAME }>([\\S\\s]*?)`, 'ig'); +const FIND_SVG_RE = /]*>/ig; +const FIND_NS_ATTRS_RE = /\s(?:NS[0-9]+:[^"']+('|")[\S\s]*?\1|[^:]+:NS[0-9]+=(?:""|''))/g; + export const INIT_SCRIPT_FOR_IFRAME_TEMPLATE = `