jodit-pro-react 5.5.45 → 5.5.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -193,7 +193,7 @@ var APP_VERSION, ES, IS_ES_MODERN, IS_ES_NEXT, IS_PROD, IS_TEST, FAT_MODE, HOMEP
|
|
|
193
193
|
var init_constants = __esm({
|
|
194
194
|
"node_modules/jodit/esm/core/constants.js"() {
|
|
195
195
|
"use strict";
|
|
196
|
-
APP_VERSION = "4.12.
|
|
196
|
+
APP_VERSION = "4.12.31";
|
|
197
197
|
ES = "es2020";
|
|
198
198
|
IS_ES_MODERN = true;
|
|
199
199
|
IS_ES_NEXT = true;
|
|
@@ -3310,11 +3310,15 @@ function normalizeCSS(s49) {
|
|
|
3310
3310
|
});
|
|
3311
3311
|
}
|
|
3312
3312
|
function applyStyles(html) {
|
|
3313
|
-
|
|
3313
|
+
const openMatch = /<html(?:\s[^>]*)?>/i.exec(html);
|
|
3314
|
+
if (!openMatch) {
|
|
3314
3315
|
return html;
|
|
3315
3316
|
}
|
|
3316
|
-
html = html.substring(
|
|
3317
|
-
|
|
3317
|
+
html = html.substring(openMatch.index);
|
|
3318
|
+
const closeIndex = html.toLowerCase().lastIndexOf("</html>");
|
|
3319
|
+
if (closeIndex !== -1) {
|
|
3320
|
+
html = html.substring(0, closeIndex + "</html>".length);
|
|
3321
|
+
}
|
|
3318
3322
|
const iframe2 = globalDocument.createElement("iframe");
|
|
3319
3323
|
iframe2.style.display = "none";
|
|
3320
3324
|
globalDocument.body.appendChild(iframe2);
|
|
@@ -4473,8 +4477,9 @@ function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = {
|
|
|
4473
4477
|
attr(elm, "onerror", null);
|
|
4474
4478
|
effected = true;
|
|
4475
4479
|
}
|
|
4480
|
+
const tagName = elm.nodeName.toLowerCase();
|
|
4476
4481
|
const href = elm.getAttribute("href");
|
|
4477
|
-
if (safeJavaScriptLink && href && href
|
|
4482
|
+
if (safeJavaScriptLink && href && isDangerousUrl(href, tagName)) {
|
|
4478
4483
|
attr(elm, "href", location.protocol + "//" + href);
|
|
4479
4484
|
effected = true;
|
|
4480
4485
|
}
|
|
@@ -4483,7 +4488,6 @@ function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = {
|
|
|
4483
4488
|
attr(elm, "srcdoc", null);
|
|
4484
4489
|
effected = true;
|
|
4485
4490
|
}
|
|
4486
|
-
const tagName = elm.nodeName.toLowerCase();
|
|
4487
4491
|
for (const name of URL_ATTRIBUTES) {
|
|
4488
4492
|
const value = elm.getAttribute(name);
|
|
4489
4493
|
if (value && isDangerousUrl(value, tagName)) {
|