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.
Files changed (59) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +3 -3
  4. package/es2015/jodit.js +57 -3
  5. package/es2015/jodit.min.js +3 -3
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.fat.min.js +3 -3
  13. package/es2018/jodit.min.js +3 -3
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +3 -3
  18. package/es2021/jodit.js +57 -3
  19. package/es2021/jodit.min.js +3 -3
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +3 -3
  28. package/es2021.en/jodit.js +57 -3
  29. package/es2021.en/jodit.min.js +4 -4
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +57 -3
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/core/constants.js +1 -1
  51. package/esm/plugins/clean-html/helpers/index.d.ts +1 -0
  52. package/esm/plugins/clean-html/helpers/index.js +1 -0
  53. package/esm/plugins/clean-html/helpers/is-allowed-media-embed.d.ts +15 -0
  54. package/esm/plugins/clean-html/helpers/is-allowed-media-embed.js +28 -0
  55. package/esm/plugins/clean-html/helpers/visitor/filters/sandbox-iframes-in-content.js +7 -0
  56. package/esm/plugins/clean-html/helpers/visitor/filters/try-remove-node.js +9 -1
  57. package/package.json +1 -1
  58. package/types/plugins/clean-html/helpers/index.d.ts +1 -0
  59. package/types/plugins/clean-html/helpers/is-allowed-media-embed.d.ts +15 -0
package/es5/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.41
4
+ * Version: v4.12.43
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -2087,7 +2087,7 @@ __webpack_require__.r(__webpack_exports__);
2087
2087
  * @packageDocumentation
2088
2088
  * @module constants
2089
2089
  */
2090
- var APP_VERSION = "4.12.41";
2090
+ var APP_VERSION = "4.12.43";
2091
2091
  // prettier-ignore
2092
2092
  var ES = "es5";
2093
2093
  var IS_ES_MODERN = false;
@@ -33454,6 +33454,43 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__.Icon.set('eraser', (_eraser_svg_
33454
33454
 
33455
33455
 
33456
33456
 
33457
+
33458
+ /***/ }),
33459
+
33460
+ /***/ 28665:
33461
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
33462
+
33463
+ "use strict";
33464
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33465
+ /* harmony export */ isAllowedMediaEmbed: function() { return /* binding */ isAllowedMediaEmbed; }
33466
+ /* harmony export */ });
33467
+ /*!
33468
+ * Jodit Editor (https://xdsoft.net/jodit/)
33469
+ * Released under MIT see LICENSE.txt in the project root for license information.
33470
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
33471
+ */ /**
33472
+ * @module plugins/clean-html
33473
+ */ // The embed URLs produced by the built-in Video button (see
33474
+ // `convertMediaUrlToVideoEmbed`): `//www.youtube.com/embed/<id>` and
33475
+ // `//player.vimeo.com/video/<id>`. `youtube-nocookie.com` is the privacy
33476
+ // variant YouTube offers for the same `/embed/` player. The `/embed/` and
33477
+ // `/video/` path prefixes are required so a bare provider link
33478
+ // (`youtube.com/@somebody`) is not treated as a player.
33479
+ var YOUTUBE_EMBED = /^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i;
33480
+ var VIMEO_EMBED = /^(https?:)?\/\/player\.vimeo\.com\/video\//i;
33481
+ /**
33482
+ * Whether an `<iframe>` `src` points at a recognized YouTube/Vimeo video
33483
+ * player. Such iframes are inserted intentionally through the Video button, so
33484
+ * clean-html must not strip them (`denyTags` includes `iframe` by default) or
33485
+ * neutralize them with an empty `sandbox=""` (#1381). Arbitrary/bare iframes
33486
+ * are still removed.
33487
+ *
33488
+ * @private
33489
+ */ function isAllowedMediaEmbed(src) {
33490
+ return YOUTUBE_EMBED.test(src) || VIMEO_EMBED.test(src);
33491
+ }
33492
+
33493
+
33457
33494
  /***/ }),
33458
33495
 
33459
33496
  /***/ 37431:
@@ -33944,6 +33981,7 @@ __webpack_require__.r(__webpack_exports__);
33944
33981
  /* harmony export */ });
33945
33982
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
33946
33983
  /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
33984
+ /* harmony import */ var _is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28665);
33947
33985
  /*!
33948
33986
  * Jodit Editor (https://xdsoft.net/jodit/)
33949
33987
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -33952,6 +33990,7 @@ __webpack_require__.r(__webpack_exports__);
33952
33990
  * @module plugins/clean-html
33953
33991
  */
33954
33992
 
33993
+
33955
33994
  /**
33956
33995
  * Add `sandbox=""` attribute to all `<iframe>` elements in the editor content
33957
33996
  * @private
@@ -33960,6 +33999,12 @@ __webpack_require__.r(__webpack_exports__);
33960
33999
  return hadEffect;
33961
34000
  }
33962
34001
  var elm = nodeElm;
34002
+ // A trusted YouTube/Vimeo player (inserted via the Video button) must not
34003
+ // get an empty `sandbox=""` — that blocks scripts and stops playback. It
34004
+ // is served in its own third-party origin, so leave it as-is (#1381).
34005
+ if ((0,_is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_2__.isAllowedMediaEmbed)((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'src') || '')) {
34006
+ return hadEffect;
34007
+ }
33963
34008
  if (!elm.hasAttribute('sandbox')) {
33964
34009
  (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'sandbox', '');
33965
34010
  return true;
@@ -34132,6 +34177,8 @@ function filterStyleProperties(style, allowed) {
34132
34177
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
34133
34178
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
34134
34179
  /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4040);
34180
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
34181
+ /* harmony import */ var _is_allowed_media_embed__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28665);
34135
34182
  /*!
34136
34183
  * Jodit Editor (https://xdsoft.net/jodit/)
34137
34184
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -34141,6 +34188,8 @@ function filterStyleProperties(style, allowed) {
34141
34188
  */
34142
34189
 
34143
34190
 
34191
+
34192
+
34144
34193
  /**
34145
34194
  * @private
34146
34195
  */ function tryRemoveNode(jodit, nodeElm, hadEffect, allowTags, denyTags, currentSelectionNode) {
@@ -34157,7 +34206,12 @@ function filterStyleProperties(style, allowed) {
34157
34206
  if (allow && !allow[node.nodeName]) {
34158
34207
  return true;
34159
34208
  }
34160
- if (!allow && deny && deny[node.nodeName]) {
34209
+ // A YouTube/Vimeo player inserted through the Video button is trusted
34210
+ // editor content, so keep it even though `iframe` is denied by default
34211
+ // — otherwise the embed is stripped ~300ms after insertion (#1381).
34212
+ // Arbitrary/bare iframes stay denied.
34213
+ var 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') || '');
34214
+ if (!allow && deny && deny[node.nodeName] && !isTrustedEmbed) {
34161
34215
  return true;
34162
34216
  }
34163
34217
  }
package/es5/jodit.min.css CHANGED
@@ -1,14 +1,14 @@
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.41
4
+ * Version: v4.12.43
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
  /*!
9
9
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
10
10
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
11
- * Version: v4.12.41
11
+ * Version: v4.12.43
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */