jodit 4.12.41 → 4.12.43
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.
- package/CHANGELOG.md +6 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +57 -3
- package/es2015/jodit.min.js +3 -3
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.js +3 -3
- package/es2018/jodit.min.js +3 -3
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +3 -3
- package/es2021/jodit.js +57 -3
- package/es2021/jodit.min.js +3 -3
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +3 -3
- package/es2021.en/jodit.js +57 -3
- package/es2021.en/jodit.min.js +4 -4
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +57 -3
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/plugins/clean-html/helpers/index.d.ts +1 -0
- package/esm/plugins/clean-html/helpers/index.js +1 -0
- package/esm/plugins/clean-html/helpers/is-allowed-media-embed.d.ts +15 -0
- package/esm/plugins/clean-html/helpers/is-allowed-media-embed.js +28 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/sandbox-iframes-in-content.js +7 -0
- package/esm/plugins/clean-html/helpers/visitor/filters/try-remove-node.js +9 -1
- package/package.json +1 -1
- package/types/plugins/clean-html/helpers/index.d.ts +1 -0
- package/types/plugins/clean-html/helpers/is-allowed-media-embed.d.ts +15 -0
package/es2021.en/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.12.
|
|
4
|
+
* Version: v4.12.43
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1823,7 +1823,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1823
1823
|
* ```
|
|
1824
1824
|
* @packageDocumentation
|
|
1825
1825
|
* @module constants
|
|
1826
|
-
*/ const APP_VERSION = "4.12.
|
|
1826
|
+
*/ const APP_VERSION = "4.12.43";
|
|
1827
1827
|
// prettier-ignore
|
|
1828
1828
|
const ES = "es2021";
|
|
1829
1829
|
const IS_ES_MODERN = true;
|
|
@@ -27769,6 +27769,43 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__.Icon.set('eraser', (_eraser_svg_
|
|
|
27769
27769
|
|
|
27770
27770
|
|
|
27771
27771
|
|
|
27772
|
+
|
|
27773
|
+
/***/ }),
|
|
27774
|
+
|
|
27775
|
+
/***/ 28665:
|
|
27776
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
27777
|
+
|
|
27778
|
+
"use strict";
|
|
27779
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
27780
|
+
/* harmony export */ isAllowedMediaEmbed: function() { return /* binding */ isAllowedMediaEmbed; }
|
|
27781
|
+
/* harmony export */ });
|
|
27782
|
+
/*!
|
|
27783
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
27784
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
27785
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
27786
|
+
*/ /**
|
|
27787
|
+
* @module plugins/clean-html
|
|
27788
|
+
*/ // The embed URLs produced by the built-in Video button (see
|
|
27789
|
+
// `convertMediaUrlToVideoEmbed`): `//www.youtube.com/embed/<id>` and
|
|
27790
|
+
// `//player.vimeo.com/video/<id>`. `youtube-nocookie.com` is the privacy
|
|
27791
|
+
// variant YouTube offers for the same `/embed/` player. The `/embed/` and
|
|
27792
|
+
// `/video/` path prefixes are required so a bare provider link
|
|
27793
|
+
// (`youtube.com/@somebody`) is not treated as a player.
|
|
27794
|
+
const YOUTUBE_EMBED = /^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i;
|
|
27795
|
+
const VIMEO_EMBED = /^(https?:)?\/\/player\.vimeo\.com\/video\//i;
|
|
27796
|
+
/**
|
|
27797
|
+
* Whether an `<iframe>` `src` points at a recognized YouTube/Vimeo video
|
|
27798
|
+
* player. Such iframes are inserted intentionally through the Video button, so
|
|
27799
|
+
* clean-html must not strip them (`denyTags` includes `iframe` by default) or
|
|
27800
|
+
* neutralize them with an empty `sandbox=""` (#1381). Arbitrary/bare iframes
|
|
27801
|
+
* are still removed.
|
|
27802
|
+
*
|
|
27803
|
+
* @private
|
|
27804
|
+
*/ function isAllowedMediaEmbed(src) {
|
|
27805
|
+
return YOUTUBE_EMBED.test(src) || VIMEO_EMBED.test(src);
|
|
27806
|
+
}
|
|
27807
|
+
|
|
27808
|
+
|
|
27772
27809
|
/***/ }),
|
|
27773
27810
|
|
|
27774
27811
|
/***/ 37431:
|
|
@@ -28257,6 +28294,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28257
28294
|
/* harmony export */ });
|
|
28258
28295
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
28259
28296
|
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
|
|
28297
|
+
/* harmony import */ var _is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28665);
|
|
28260
28298
|
/*!
|
|
28261
28299
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
28262
28300
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -28265,6 +28303,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28265
28303
|
* @module plugins/clean-html
|
|
28266
28304
|
*/
|
|
28267
28305
|
|
|
28306
|
+
|
|
28268
28307
|
/**
|
|
28269
28308
|
* Add `sandbox=""` attribute to all `<iframe>` elements in the editor content
|
|
28270
28309
|
* @private
|
|
@@ -28273,6 +28312,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28273
28312
|
return hadEffect;
|
|
28274
28313
|
}
|
|
28275
28314
|
const elm = nodeElm;
|
|
28315
|
+
// A trusted YouTube/Vimeo player (inserted via the Video button) must not
|
|
28316
|
+
// get an empty `sandbox=""` — that blocks scripts and stops playback. It
|
|
28317
|
+
// is served in its own third-party origin, so leave it as-is (#1381).
|
|
28318
|
+
if ((0,_is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_2__.isAllowedMediaEmbed)((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'src') || '')) {
|
|
28319
|
+
return hadEffect;
|
|
28320
|
+
}
|
|
28276
28321
|
if (!elm.hasAttribute('sandbox')) {
|
|
28277
28322
|
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'sandbox', '');
|
|
28278
28323
|
return true;
|
|
@@ -28409,6 +28454,8 @@ function filterStyleProperties(style, allowed) {
|
|
|
28409
28454
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
|
|
28410
28455
|
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
|
|
28411
28456
|
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4040);
|
|
28457
|
+
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
|
|
28458
|
+
/* harmony import */ var _is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28665);
|
|
28412
28459
|
/*!
|
|
28413
28460
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
28414
28461
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -28418,6 +28465,8 @@ function filterStyleProperties(style, allowed) {
|
|
|
28418
28465
|
*/
|
|
28419
28466
|
|
|
28420
28467
|
|
|
28468
|
+
|
|
28469
|
+
|
|
28421
28470
|
/**
|
|
28422
28471
|
* @private
|
|
28423
28472
|
*/ function tryRemoveNode(jodit, nodeElm, hadEffect, allowTags, denyTags, currentSelectionNode) {
|
|
@@ -28434,7 +28483,12 @@ function filterStyleProperties(style, allowed) {
|
|
|
28434
28483
|
if (allow && !allow[node.nodeName]) {
|
|
28435
28484
|
return true;
|
|
28436
28485
|
}
|
|
28437
|
-
|
|
28486
|
+
// A YouTube/Vimeo player inserted through the Video button is trusted
|
|
28487
|
+
// editor content, so keep it even though `iframe` is denied by default
|
|
28488
|
+
// — otherwise the embed is stripped ~300ms after insertion (#1381).
|
|
28489
|
+
// Arbitrary/bare iframes stay denied.
|
|
28490
|
+
const isTrustedEmbed = node.nodeName === 'IFRAME' && (0,_is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_4__.isAllowedMediaEmbed)((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(node, 'src') || '');
|
|
28491
|
+
if (!allow && deny && deny[node.nodeName] && !isTrustedEmbed) {
|
|
28438
28492
|
return true;
|
|
28439
28493
|
}
|
|
28440
28494
|
}
|