jodit 4.10.3 → 4.11.3

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 (87) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +15 -15
  4. package/es2015/jodit.js +359 -62
  5. package/es2015/jodit.min.js +7 -7
  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 +6 -6
  13. package/es2018/jodit.min.js +15 -15
  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 +8 -8
  18. package/es2021/jodit.js +358 -62
  19. package/es2021/jodit.min.js +9 -9
  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 +50 -50
  28. package/es2021.en/jodit.js +358 -62
  29. package/es2021.en/jodit.min.js +25 -25
  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 +416 -62
  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/config.d.ts +85 -0
  51. package/esm/core/constants.js +1 -1
  52. package/esm/core/dom/dom.d.ts +1 -0
  53. package/esm/core/helpers/html/safe-html.d.ts +3 -2
  54. package/esm/core/helpers/html/safe-html.js +42 -3
  55. package/esm/plugins/clean-html/clean-html.js +4 -0
  56. package/esm/plugins/clean-html/config.d.ts +85 -0
  57. package/esm/plugins/clean-html/config.js +7 -1
  58. package/esm/plugins/clean-html/helpers/visitor/filters/convert-unsafe-embeds.d.ts +14 -0
  59. package/esm/plugins/clean-html/helpers/visitor/filters/convert-unsafe-embeds.js +37 -0
  60. package/esm/plugins/clean-html/helpers/visitor/filters/index.d.ts +4 -0
  61. package/esm/plugins/clean-html/helpers/visitor/filters/index.js +4 -0
  62. package/esm/plugins/clean-html/helpers/visitor/filters/safe-links-target.d.ts +14 -0
  63. package/esm/plugins/clean-html/helpers/visitor/filters/safe-links-target.js +38 -0
  64. package/esm/plugins/clean-html/helpers/visitor/filters/sandbox-iframes-in-content.d.ts +14 -0
  65. package/esm/plugins/clean-html/helpers/visitor/filters/sandbox-iframes-in-content.js +24 -0
  66. package/esm/plugins/clean-html/helpers/visitor/filters/sanitize-attributes.js +10 -5
  67. package/esm/plugins/clean-html/helpers/visitor/filters/sanitize-styles.d.ts +14 -0
  68. package/esm/plugins/clean-html/helpers/visitor/filters/sanitize-styles.js +70 -0
  69. package/esm/plugins/drag-and-drop/drag-and-drop.js +1 -1
  70. package/esm/plugins/enter/helpers/insert-paragraph.js +2 -1
  71. package/esm/plugins/file/file.js +3 -2
  72. package/esm/plugins/iframe/iframe.js +8 -6
  73. package/esm/plugins/image/image.js +3 -2
  74. package/esm/plugins/image-properties/writers/link.js +6 -0
  75. package/esm/plugins/link/link.js +15 -3
  76. package/esm/plugins/resizer/resizer.js +2 -2
  77. package/esm/plugins/source/editor/engines/area.js +3 -7
  78. package/package.json +1 -1
  79. package/types/config.d.ts +85 -0
  80. package/types/core/dom/dom.d.ts +1 -0
  81. package/types/core/helpers/html/safe-html.d.ts +3 -2
  82. package/types/plugins/clean-html/config.d.ts +85 -0
  83. package/types/plugins/clean-html/helpers/visitor/filters/convert-unsafe-embeds.d.ts +14 -0
  84. package/types/plugins/clean-html/helpers/visitor/filters/index.d.ts +4 -0
  85. package/types/plugins/clean-html/helpers/visitor/filters/safe-links-target.d.ts +14 -0
  86. package/types/plugins/clean-html/helpers/visitor/filters/sandbox-iframes-in-content.d.ts +14 -0
  87. package/types/plugins/clean-html/helpers/visitor/filters/sanitize-styles.d.ts +14 -0
package/es2021/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.10.3
4
+ * Version: v4.11.3
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1758,7 +1758,7 @@ __webpack_require__.r(__webpack_exports__);
1758
1758
  * ```
1759
1759
  * @packageDocumentation
1760
1760
  * @module constants
1761
- */ const APP_VERSION = "4.10.3";
1761
+ */ const APP_VERSION = "4.11.3";
1762
1762
  // prettier-ignore
1763
1763
  const ES = "es2021";
1764
1764
  const IS_ES_MODERN = true;
@@ -5934,14 +5934,50 @@ function normalizeCSS(s) {
5934
5934
  if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(box) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isFragment(box)) {
5935
5935
  return;
5936
5936
  }
5937
- if (options.removeOnError) {
5938
- sanitizeHTMLElement(box);
5937
+ const removeEvents = options.removeEventAttributes ?? options.removeOnError;
5938
+ if (removeEvents) {
5939
+ removeAllEventAttributes(box);
5940
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.$$)('*', box).forEach((elm)=>removeAllEventAttributes(elm));
5941
+ } else if (options.removeOnError) {
5942
+ sanitizeHTMLElement(box, options);
5939
5943
  (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.$$)('[onerror]', box).forEach((elm)=>sanitizeHTMLElement(elm, options));
5940
5944
  }
5941
5945
  if (options.safeJavaScriptLink) {
5942
- sanitizeHTMLElement(box);
5946
+ sanitizeHTMLElement(box, options);
5943
5947
  (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.$$)('a[href^="javascript"]', box).forEach((elm)=>sanitizeHTMLElement(elm, options));
5944
5948
  }
5949
+ if (options.safeLinksTarget) {
5950
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.$$)('a[target="_blank"]', box).forEach((elm)=>{
5951
+ const rel = elm.getAttribute('rel') || '';
5952
+ const parts = rel.split(/\s+/).filter(Boolean);
5953
+ if (!parts.includes('noopener')) {
5954
+ parts.push('noopener');
5955
+ }
5956
+ if (!parts.includes('noreferrer')) {
5957
+ parts.push('noreferrer');
5958
+ }
5959
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'rel', parts.join(' '));
5960
+ });
5961
+ }
5962
+ }
5963
+ /**
5964
+ * Remove all on* event handler attributes from an element
5965
+ */ function removeAllEventAttributes(elm) {
5966
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(elm)) {
5967
+ return false;
5968
+ }
5969
+ let effected = false;
5970
+ const toRemove = [];
5971
+ for(let i = 0; i < elm.attributes.length; i++){
5972
+ if (elm.attributes[i].name.toLowerCase().startsWith('on')) {
5973
+ toRemove.push(elm.attributes[i].name);
5974
+ }
5975
+ }
5976
+ for (const name of toRemove){
5977
+ elm.removeAttribute(name);
5978
+ effected = true;
5979
+ }
5980
+ return effected;
5945
5981
  }
5946
5982
  function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = {
5947
5983
  safeJavaScriptLink: true,
@@ -26669,6 +26705,10 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
26669
26705
  return false;
26670
26706
  }
26671
26707
  onSafeHTML(sandBox) {
26708
+ const sanitizer = this.j.o.cleanHTML.sanitizer;
26709
+ if (sanitizer) {
26710
+ sandBox.innerHTML = sanitizer(sandBox.innerHTML);
26711
+ }
26672
26712
  (0,jodit_core_helpers_html_safe_html__WEBPACK_IMPORTED_MODULE_6__.safeHTML)(sandBox, this.j.o.cleanHTML);
26673
26713
  }
26674
26714
  /** @override */ beforeDestruct() {
@@ -26738,10 +26778,19 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.cleanHTML = {
26738
26778
  b: 'strong'
26739
26779
  },
26740
26780
  allowTags: false,
26741
- denyTags: 'script',
26781
+ denyTags: 'script,iframe,object,embed',
26742
26782
  useIframeSandbox: false,
26743
26783
  removeOnError: true,
26784
+ removeEventAttributes: true,
26744
26785
  safeJavaScriptLink: true,
26786
+ safeLinksTarget: true,
26787
+ allowedStyles: false,
26788
+ sanitizer: false,
26789
+ sandboxIframesInContent: true,
26790
+ convertUnsafeEmbeds: [
26791
+ 'object',
26792
+ 'embed'
26793
+ ],
26745
26794
  disableCleanFilter: null
26746
26795
  };
26747
26796
  jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.eraser = {
@@ -27003,6 +27052,56 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__.Icon.set('eraser', (_eraser_svg_
27003
27052
  }
27004
27053
 
27005
27054
 
27055
+ /***/ }),
27056
+
27057
+ /***/ 85085:
27058
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
27059
+
27060
+ "use strict";
27061
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27062
+ /* harmony export */ convertUnsafeEmbeds: function() { return /* binding */ convertUnsafeEmbeds; }
27063
+ /* harmony export */ });
27064
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
27065
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
27066
+ /*!
27067
+ * Jodit Editor (https://xdsoft.net/jodit/)
27068
+ * Released under MIT see LICENSE.txt in the project root for license information.
27069
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
27070
+ */ /**
27071
+ * @module plugins/clean-html
27072
+ */
27073
+
27074
+ /**
27075
+ * Convert `<object>` and `<embed>` elements to safer `<iframe>` elements.
27076
+ * @private
27077
+ */ function convertUnsafeEmbeds(jodit, nodeElm, hadEffect) {
27078
+ const opt = jodit.o.cleanHTML.convertUnsafeEmbeds;
27079
+ if (!opt || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm)) {
27080
+ return hadEffect;
27081
+ }
27082
+ const tag = nodeElm.nodeName.toLowerCase();
27083
+ if (!opt.includes(tag)) {
27084
+ return hadEffect;
27085
+ }
27086
+ const elm = nodeElm;
27087
+ const src = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'data') || (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'src') || (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'movie') || '';
27088
+ if (!src) {
27089
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(elm);
27090
+ return true;
27091
+ }
27092
+ const iframe = jodit.createInside.element('iframe');
27093
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(iframe, {
27094
+ src,
27095
+ sandbox: '',
27096
+ frameborder: '0',
27097
+ width: (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'width'),
27098
+ height: (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'height')
27099
+ });
27100
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(elm, iframe, undefined, false, true);
27101
+ return true;
27102
+ }
27103
+
27104
+
27006
27105
  /***/ }),
27007
27106
 
27008
27107
  /***/ 39188:
@@ -27050,20 +27149,28 @@ const TABLE_CONTAINER_TAGS = new Set([
27050
27149
  __webpack_require__.r(__webpack_exports__);
27051
27150
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27052
27151
  /* harmony export */ allowAttributes: function() { return /* reexport safe */ _allow_attributes__WEBPACK_IMPORTED_MODULE_0__.allowAttributes; },
27053
- /* harmony export */ fillEmptyParagraph: function() { return /* reexport safe */ _fill_empty_paragraph__WEBPACK_IMPORTED_MODULE_1__.fillEmptyParagraph; },
27054
- /* harmony export */ removeEmptyTextNode: function() { return /* reexport safe */ _remove_empty_text_node__WEBPACK_IMPORTED_MODULE_2__.removeEmptyTextNode; },
27055
- /* harmony export */ removeInvTextNodes: function() { return /* reexport safe */ _remove_inv_text_nodes__WEBPACK_IMPORTED_MODULE_3__.removeInvTextNodes; },
27056
- /* harmony export */ replaceOldTags: function() { return /* reexport safe */ _replace_old_tags__WEBPACK_IMPORTED_MODULE_4__.replaceOldTags; },
27057
- /* harmony export */ sanitizeAttributes: function() { return /* reexport safe */ _sanitize_attributes__WEBPACK_IMPORTED_MODULE_5__.sanitizeAttributes; },
27058
- /* harmony export */ tryRemoveNode: function() { return /* reexport safe */ _try_remove_node__WEBPACK_IMPORTED_MODULE_6__.tryRemoveNode; }
27152
+ /* harmony export */ convertUnsafeEmbeds: function() { return /* reexport safe */ _convert_unsafe_embeds__WEBPACK_IMPORTED_MODULE_1__.convertUnsafeEmbeds; },
27153
+ /* harmony export */ fillEmptyParagraph: function() { return /* reexport safe */ _fill_empty_paragraph__WEBPACK_IMPORTED_MODULE_2__.fillEmptyParagraph; },
27154
+ /* harmony export */ removeEmptyTextNode: function() { return /* reexport safe */ _remove_empty_text_node__WEBPACK_IMPORTED_MODULE_3__.removeEmptyTextNode; },
27155
+ /* harmony export */ removeInvTextNodes: function() { return /* reexport safe */ _remove_inv_text_nodes__WEBPACK_IMPORTED_MODULE_4__.removeInvTextNodes; },
27156
+ /* harmony export */ replaceOldTags: function() { return /* reexport safe */ _replace_old_tags__WEBPACK_IMPORTED_MODULE_5__.replaceOldTags; },
27157
+ /* harmony export */ safeLinksTarget: function() { return /* reexport safe */ _safe_links_target__WEBPACK_IMPORTED_MODULE_6__.safeLinksTarget; },
27158
+ /* harmony export */ sandboxIframesInContent: function() { return /* reexport safe */ _sandbox_iframes_in_content__WEBPACK_IMPORTED_MODULE_7__.sandboxIframesInContent; },
27159
+ /* harmony export */ sanitizeAttributes: function() { return /* reexport safe */ _sanitize_attributes__WEBPACK_IMPORTED_MODULE_8__.sanitizeAttributes; },
27160
+ /* harmony export */ sanitizeStyles: function() { return /* reexport safe */ _sanitize_styles__WEBPACK_IMPORTED_MODULE_9__.sanitizeStyles; },
27161
+ /* harmony export */ tryRemoveNode: function() { return /* reexport safe */ _try_remove_node__WEBPACK_IMPORTED_MODULE_10__.tryRemoveNode; }
27059
27162
  /* harmony export */ });
27060
27163
  /* harmony import */ var _allow_attributes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95559);
27061
- /* harmony import */ var _fill_empty_paragraph__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39188);
27062
- /* harmony import */ var _remove_empty_text_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94561);
27063
- /* harmony import */ var _remove_inv_text_nodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53514);
27064
- /* harmony import */ var _replace_old_tags__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35104);
27065
- /* harmony import */ var _sanitize_attributes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65015);
27066
- /* harmony import */ var _try_remove_node__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(27611);
27164
+ /* harmony import */ var _convert_unsafe_embeds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85085);
27165
+ /* harmony import */ var _fill_empty_paragraph__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39188);
27166
+ /* harmony import */ var _remove_empty_text_node__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94561);
27167
+ /* harmony import */ var _remove_inv_text_nodes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53514);
27168
+ /* harmony import */ var _replace_old_tags__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(35104);
27169
+ /* harmony import */ var _safe_links_target__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(77041);
27170
+ /* harmony import */ var _sandbox_iframes_in_content__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(66647);
27171
+ /* harmony import */ var _sanitize_attributes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65015);
27172
+ /* harmony import */ var _sanitize_styles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(60220);
27173
+ /* harmony import */ var _try_remove_node__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(27611);
27067
27174
  /*!
27068
27175
  * Jodit Editor (https://xdsoft.net/jodit/)
27069
27176
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -27081,6 +27188,10 @@ __webpack_require__.r(__webpack_exports__);
27081
27188
 
27082
27189
 
27083
27190
 
27191
+
27192
+
27193
+
27194
+
27084
27195
  /***/ }),
27085
27196
 
27086
27197
  /***/ 94561:
@@ -27197,6 +27308,90 @@ __webpack_require__.r(__webpack_exports__);
27197
27308
  }
27198
27309
 
27199
27310
 
27311
+ /***/ }),
27312
+
27313
+ /***/ 77041:
27314
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
27315
+
27316
+ "use strict";
27317
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27318
+ /* harmony export */ safeLinksTarget: function() { return /* binding */ safeLinksTarget; }
27319
+ /* harmony export */ });
27320
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
27321
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
27322
+ /*!
27323
+ * Jodit Editor (https://xdsoft.net/jodit/)
27324
+ * Released under MIT see LICENSE.txt in the project root for license information.
27325
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
27326
+ */ /**
27327
+ * @module plugins/clean-html
27328
+ */
27329
+
27330
+ /**
27331
+ * Automatically add `rel="noopener noreferrer"` to links with `target="_blank"`
27332
+ * @private
27333
+ */ function safeLinksTarget(jodit, nodeElm, hadEffect) {
27334
+ if (!jodit.o.cleanHTML.safeLinksTarget || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm) || nodeElm.nodeName !== 'A') {
27335
+ return hadEffect;
27336
+ }
27337
+ const elm = nodeElm;
27338
+ if ((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'target') !== '_blank') {
27339
+ return hadEffect;
27340
+ }
27341
+ const rel = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'rel') || '';
27342
+ const parts = rel.split(/\s+/).filter(Boolean);
27343
+ let changed = false;
27344
+ if (!parts.includes('noopener')) {
27345
+ parts.push('noopener');
27346
+ changed = true;
27347
+ }
27348
+ if (!parts.includes('noreferrer')) {
27349
+ parts.push('noreferrer');
27350
+ changed = true;
27351
+ }
27352
+ if (changed) {
27353
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'rel', parts.join(' '));
27354
+ return true;
27355
+ }
27356
+ return hadEffect;
27357
+ }
27358
+
27359
+
27360
+ /***/ }),
27361
+
27362
+ /***/ 66647:
27363
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
27364
+
27365
+ "use strict";
27366
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27367
+ /* harmony export */ sandboxIframesInContent: function() { return /* binding */ sandboxIframesInContent; }
27368
+ /* harmony export */ });
27369
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
27370
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
27371
+ /*!
27372
+ * Jodit Editor (https://xdsoft.net/jodit/)
27373
+ * Released under MIT see LICENSE.txt in the project root for license information.
27374
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
27375
+ */ /**
27376
+ * @module plugins/clean-html
27377
+ */
27378
+
27379
+ /**
27380
+ * Add `sandbox=""` attribute to all `<iframe>` elements in the editor content
27381
+ * @private
27382
+ */ function sandboxIframesInContent(jodit, nodeElm, hadEffect) {
27383
+ if (!jodit.o.cleanHTML.sandboxIframesInContent || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm) || nodeElm.nodeName !== 'IFRAME') {
27384
+ return hadEffect;
27385
+ }
27386
+ const elm = nodeElm;
27387
+ if (!elm.hasAttribute('sandbox')) {
27388
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'sandbox', '');
27389
+ return true;
27390
+ }
27391
+ return hadEffect;
27392
+ }
27393
+
27394
+
27200
27395
  /***/ }),
27201
27396
 
27202
27397
  /***/ 65015:
@@ -27219,9 +27414,15 @@ __webpack_require__.r(__webpack_exports__);
27219
27414
  /**
27220
27415
  * @private
27221
27416
  */ function sanitizeAttributes(jodit, nodeElm, hadEffect) {
27222
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm) && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.sanitizeHTMLElement)(nodeElm, {
27223
- safeJavaScriptLink: jodit.options.cleanHTML.safeJavaScriptLink,
27224
- removeOnError: jodit.options.cleanHTML.removeOnError
27417
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm)) {
27418
+ return hadEffect;
27419
+ }
27420
+ const opts = jodit.options.cleanHTML;
27421
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.sanitizeHTMLElement)(nodeElm, {
27422
+ safeJavaScriptLink: opts.safeJavaScriptLink,
27423
+ removeOnError: opts.removeOnError,
27424
+ removeEventAttributes: opts.removeEventAttributes,
27425
+ safeLinksTarget: opts.safeLinksTarget
27225
27426
  })) {
27226
27427
  return true;
27227
27428
  }
@@ -27229,6 +27430,84 @@ __webpack_require__.r(__webpack_exports__);
27229
27430
  }
27230
27431
 
27231
27432
 
27433
+ /***/ }),
27434
+
27435
+ /***/ 60220:
27436
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
27437
+
27438
+ "use strict";
27439
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27440
+ /* harmony export */ sanitizeStyles: function() { return /* binding */ sanitizeStyles; }
27441
+ /* harmony export */ });
27442
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
27443
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
27444
+ /*!
27445
+ * Jodit Editor (https://xdsoft.net/jodit/)
27446
+ * Released under MIT see LICENSE.txt in the project root for license information.
27447
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
27448
+ */ /**
27449
+ * @module plugins/clean-html
27450
+ */
27451
+
27452
+ /**
27453
+ * Filter CSS properties in style attributes based on allowedStyles whitelist
27454
+ * @private
27455
+ */ function sanitizeStyles(jodit, nodeElm, hadEffect) {
27456
+ const allowedStyles = jodit.o.cleanHTML.allowedStyles;
27457
+ if (!allowedStyles || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm)) {
27458
+ return hadEffect;
27459
+ }
27460
+ const elm = nodeElm;
27461
+ const style = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style');
27462
+ if (!style) {
27463
+ return hadEffect;
27464
+ }
27465
+ const tagName = nodeElm.nodeName.toLowerCase();
27466
+ const allowed = getAllowedPropsForTag(tagName, allowedStyles);
27467
+ if (!allowed) {
27468
+ return hadEffect;
27469
+ }
27470
+ const filtered = filterStyleProperties(style, allowed);
27471
+ if (filtered !== style) {
27472
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style', filtered || null);
27473
+ return true;
27474
+ }
27475
+ return hadEffect;
27476
+ }
27477
+ function getAllowedPropsForTag(tagName, allowedStyles) {
27478
+ const tagSpecific = allowedStyles[tagName];
27479
+ const global = allowedStyles['*'];
27480
+ if (!tagSpecific && !global) {
27481
+ return null;
27482
+ }
27483
+ const set = new Set();
27484
+ if (global) {
27485
+ for (const prop of global){
27486
+ set.add(prop.toLowerCase());
27487
+ }
27488
+ }
27489
+ if (tagSpecific) {
27490
+ for (const prop of tagSpecific){
27491
+ set.add(prop.toLowerCase());
27492
+ }
27493
+ }
27494
+ return set;
27495
+ }
27496
+ function filterStyleProperties(style, allowed) {
27497
+ return style.split(';').map((s)=>s.trim()).filter((s)=>{
27498
+ if (!s) {
27499
+ return false;
27500
+ }
27501
+ const colonIdx = s.indexOf(':');
27502
+ if (colonIdx === -1) {
27503
+ return false;
27504
+ }
27505
+ const prop = s.substring(0, colonIdx).trim().toLowerCase();
27506
+ return allowed.has(prop);
27507
+ }).join('; ').replace(/;\s*$/, '');
27508
+ }
27509
+
27510
+
27232
27511
  /***/ }),
27233
27512
 
27234
27513
  /***/ 27611:
@@ -28676,7 +28955,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('dragAndDropElem
28676
28955
  'src'
28677
28956
  ];
28678
28957
  fragment = this.j.createInside.element(tagName);
28679
- fragment.setAttribute(field, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(this.draggable, 'data-src') || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(this.draggable, 'src') || '');
28958
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(fragment, field, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(this.draggable, 'data-src') || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(this.draggable, 'src') || '');
28680
28959
  if (tagName === 'a') {
28681
28960
  fragment.textContent = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(fragment, field) || '';
28682
28961
  }
@@ -29296,7 +29575,8 @@ function brBefore(start) {
29296
29575
  /* harmony export */ insertParagraph: function() { return /* binding */ insertParagraph; }
29297
29576
  /* harmony export */ });
29298
29577
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
29299
- /* harmony import */ var jodit_core_helpers_utils_scroll_into_view__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60898);
29578
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
29579
+ /* harmony import */ var jodit_core_helpers_utils_scroll_into_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60898);
29300
29580
  /*!
29301
29581
  * Jodit Editor (https://xdsoft.net/jodit/)
29302
29582
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -29305,6 +29585,7 @@ function brBefore(start) {
29305
29585
  * @module plugins/enter
29306
29586
  */
29307
29587
 
29588
+
29308
29589
  /**
29309
29590
  * Insert default paragraph
29310
29591
  * @private
@@ -29314,11 +29595,11 @@ function brBefore(start) {
29314
29595
  p.appendChild(br);
29315
29596
  }
29316
29597
  if (style && style.cssText) {
29317
- p.setAttribute('style', style.cssText);
29598
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(p, 'style', style.cssText);
29318
29599
  }
29319
29600
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(fake, p);
29320
29601
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.before(isBR ? p : br, fake);
29321
- (0,jodit_core_helpers_utils_scroll_into_view__WEBPACK_IMPORTED_MODULE_1__.scrollIntoViewIfNeeded)(p, editor.editor, editor.ed);
29602
+ (0,jodit_core_helpers_utils_scroll_into_view__WEBPACK_IMPORTED_MODULE_2__.scrollIntoViewIfNeeded)(p, editor.editor, editor.ed);
29322
29603
  return p;
29323
29604
  }
29324
29605
 
@@ -29508,8 +29789,9 @@ function brBefore(start) {
29508
29789
  /* unused harmony export file */
29509
29790
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
29510
29791
  /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28077);
29511
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5266);
29512
- /* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15753);
29792
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7909);
29793
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5266);
29794
+ /* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15753);
29513
29795
  /*!
29514
29796
  * Jodit Editor (https://xdsoft.net/jodit/)
29515
29797
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -29522,7 +29804,8 @@ function brBefore(start) {
29522
29804
 
29523
29805
 
29524
29806
 
29525
- jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.file = {
29807
+
29808
+ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
29526
29809
  popup: (editor, current, close)=>{
29527
29810
  const insert = (url, title = '')=>{
29528
29811
  editor.s.insertNode(editor.createInside.fromHTML(`<a href="${url}" title="${title}">${title || url}</a>`));
@@ -29531,7 +29814,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.file = {
29531
29814
  if (current && (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current, 'a') || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, 'a', editor.editor))) {
29532
29815
  sourceAnchor = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current, 'a') ? current : jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, 'a', editor.editor);
29533
29816
  }
29534
- return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_3__.FileSelectorWidget)(editor, {
29817
+ return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__.FileSelectorWidget)(editor, {
29535
29818
  filebrowser: (data)=>{
29536
29819
  data.files && data.files.forEach((file)=>insert(data.baseurl + file));
29537
29820
  close();
@@ -29539,8 +29822,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.file = {
29539
29822
  upload: true,
29540
29823
  url: (url, text)=>{
29541
29824
  if (sourceAnchor) {
29542
- sourceAnchor.setAttribute('href', url);
29543
- sourceAnchor.setAttribute('title', text);
29825
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(sourceAnchor, 'href', url);
29826
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(sourceAnchor, 'title', text);
29544
29827
  } else {
29545
29828
  insert(url, text);
29546
29829
  }
@@ -30403,8 +30686,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
30403
30686
  if (opt.iframeCSSLinks) {
30404
30687
  opt.iframeCSSLinks.forEach((href)=>{
30405
30688
  const link = doc.createElement('link');
30406
- link.setAttribute('rel', 'stylesheet');
30407
- link.setAttribute('href', href);
30689
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'rel', 'stylesheet');
30690
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'href', href);
30408
30691
  doc.head && doc.head.appendChild(link);
30409
30692
  });
30410
30693
  }
@@ -30421,11 +30704,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
30421
30704
  iframe.style.display = 'block';
30422
30705
  iframe.src = 'about:blank';
30423
30706
  iframe.className = 'jodit-wysiwyg_iframe';
30424
- iframe.setAttribute('allowtransparency', 'true');
30425
- iframe.setAttribute('tabindex', opt.tabIndex.toString());
30426
- iframe.setAttribute('frameborder', '0');
30707
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(iframe, {
30708
+ allowtransparency: 'true',
30709
+ tabindex: opt.tabIndex.toString(),
30710
+ frameborder: '0'
30711
+ });
30427
30712
  if (opt.iframeSandbox != null) {
30428
- iframe.setAttribute('sandbox', opt.iframeSandbox);
30713
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(iframe, 'sandbox', opt.iframeSandbox);
30429
30714
  }
30430
30715
  editor.workplace.appendChild(iframe);
30431
30716
  editor.iframe = iframe;
@@ -32112,6 +32397,10 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__
32112
32397
  }
32113
32398
  (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'href', imageLink);
32114
32399
  (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'target', imageLinkOpenInNewTab ? '_blank' : null);
32400
+ if (!imageLinkOpenInNewTab) {
32401
+ const relParts = ((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel') || '').split(/\s+/).filter((p)=>p && p !== 'noopener' && p !== 'noreferrer');
32402
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel', relParts.length ? relParts.join(' ') : null);
32403
+ }
32115
32404
  } else {
32116
32405
  if (link && link.parentNode) {
32117
32406
  link.parentNode.replaceChild(image, link);
@@ -32221,11 +32510,12 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__
32221
32510
  /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27795);
32222
32511
  /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28077);
32223
32512
  /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65946);
32224
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29434);
32225
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5266);
32226
- /* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(15753);
32227
- /* harmony import */ var _image_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(64831);
32228
- /* harmony import */ var _image_svg__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_image_svg__WEBPACK_IMPORTED_MODULE_6__);
32513
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7909);
32514
+ /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29434);
32515
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5266);
32516
+ /* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(15753);
32517
+ /* harmony import */ var _image_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(64831);
32518
+ /* harmony import */ var _image_svg__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_image_svg__WEBPACK_IMPORTED_MODULE_7__);
32229
32519
  /*!
32230
32520
  * Jodit Editor (https://xdsoft.net/jodit/)
32231
32521
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -32241,15 +32531,16 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__
32241
32531
 
32242
32532
 
32243
32533
 
32244
- jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__.Icon.set('image', (_image_svg__WEBPACK_IMPORTED_MODULE_6___default()));
32245
- jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.image = {
32534
+
32535
+ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__.Icon.set('image', (_image_svg__WEBPACK_IMPORTED_MODULE_7___default()));
32536
+ jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.image = {
32246
32537
  popup: (editor, current, close)=>{
32247
32538
  let sourceImage = null;
32248
32539
  if (current && !jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isText(current) && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(current) && (jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current, 'img') || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.$$)('img', current).length)) {
32249
32540
  sourceImage = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(current, 'img') ? current : (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.$$)('img', current)[0];
32250
32541
  }
32251
32542
  editor.s.save();
32252
- return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__.FileSelectorWidget)(editor, {
32543
+ return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_6__.FileSelectorWidget)(editor, {
32253
32544
  filebrowser: (data)=>{
32254
32545
  editor.s.restore();
32255
32546
  data.files && data.files.forEach((file)=>editor.s.insertImage(data.baseurl + file, null, editor.o.imageDefaultWidth));
@@ -32262,8 +32553,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.image = {
32262
32553
  url = '//' + url;
32263
32554
  }
32264
32555
  const image = sourceImage || editor.createInside.element('img');
32265
- image.setAttribute('src', url);
32266
- image.setAttribute('alt', text);
32556
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'src', url);
32557
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_3__.attr)(image, 'alt', text);
32267
32558
  if (!sourceImage) {
32268
32559
  await editor.s.insertImage(image, null, editor.o.imageDefaultWidth);
32269
32560
  }
@@ -34275,7 +34566,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
34275
34566
  }
34276
34567
  if (jodit.s.isCollapsed()) {
34277
34568
  const a = jodit.createInside.element('a');
34278
- a.setAttribute('href', html);
34569
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'href', html);
34279
34570
  a.textContent = html;
34280
34571
  jodit.e.fire('applyLink', jodit, a, null);
34281
34572
  return a;
@@ -34335,7 +34626,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
34335
34626
  target_checkbox.checked = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'target') === '_blank';
34336
34627
  }
34337
34628
  if (noFollowCheckbox && nofollow_checkbox) {
34338
- nofollow_checkbox.checked = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'rel') === 'nofollow';
34629
+ nofollow_checkbox.checked = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'rel') || '').split(/\s+/).includes('nofollow');
34339
34630
  }
34340
34631
  insert.textContent = i18n('Update');
34341
34632
  } else {
@@ -34401,7 +34692,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
34401
34692
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
34402
34693
  }
34403
34694
  if (noFollowCheckbox && nofollow_checkbox) {
34404
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'rel', nofollow_checkbox.checked ? 'nofollow' : null);
34695
+ const relParts = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'rel') || '').split(/\s+/).filter(Boolean);
34696
+ const hasNofollow = relParts.includes('nofollow');
34697
+ if (nofollow_checkbox.checked && !hasNofollow) {
34698
+ relParts.push('nofollow');
34699
+ } else if (!nofollow_checkbox.checked && hasNofollow) {
34700
+ relParts.splice(relParts.indexOf('nofollow'), 1);
34701
+ }
34702
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
34405
34703
  }
34406
34704
  jodit.e.fire('applyLink', jodit, a, form);
34407
34705
  });
@@ -37032,8 +37330,8 @@ const keyBInd = '__jodit-resizer_binded';
37032
37330
  this.j.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
37033
37331
  this.j.s.select(element);
37034
37332
  }).off(element, 'changesize').on(element, 'changesize', ()=>{
37035
- iframe.setAttribute('width', element.offsetWidth + 'px');
37036
- iframe.setAttribute('height', element.offsetHeight + 'px');
37333
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'width', element.offsetWidth + 'px');
37334
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'height', element.offsetHeight + 'px');
37037
37335
  });
37038
37336
  }
37039
37337
  this.j.e.on(element, 'dragstart', this.hide);
@@ -39070,8 +39368,9 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
39070
39368
  /* harmony export */ });
39071
39369
  /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
39072
39370
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
39073
- /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(80991);
39074
- /* harmony import */ var jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94193);
39371
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7909);
39372
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80991);
39373
+ /* harmony import */ var jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94193);
39075
39374
  /*!
39076
39375
  * Jodit Editor (https://xdsoft.net/jodit/)
39077
39376
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -39082,7 +39381,8 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
39082
39381
 
39083
39382
 
39084
39383
 
39085
- class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORTED_MODULE_3__.SourceEditor {
39384
+
39385
+ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORTED_MODULE_4__.SourceEditor {
39086
39386
  init(editor) {
39087
39387
  this.instance = editor.c.element('textarea', {
39088
39388
  class: 'jodit-source__mirror',
@@ -39090,7 +39390,7 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
39090
39390
  });
39091
39391
  this.container.appendChild(this.instance);
39092
39392
  editor.e.on(this.instance, 'mousedown keydown touchstart input', editor.async.debounce(this.toWYSIWYG, editor.defaultTimeout)).on('setMinHeight.source', (minHeightD)=>{
39093
- (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__.css)(this.instance, 'minHeight', minHeightD);
39393
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(this.instance, 'minHeight', minHeightD);
39094
39394
  }).on(this.instance, 'change keydown mousedown touchstart input', this.autosize).on('afterSetMode.source', this.autosize).on(this.instance, 'mousedown focus', (e)=>{
39095
39395
  editor.e.fire(e.type, e);
39096
39396
  });
@@ -39134,14 +39434,10 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
39134
39434
  this.instance.blur();
39135
39435
  }
39136
39436
  setPlaceHolder(title) {
39137
- this.instance.setAttribute('placeholder', title);
39437
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(this.instance, 'placeholder', title);
39138
39438
  }
39139
39439
  setReadOnly(isReadOnly) {
39140
- if (isReadOnly) {
39141
- this.instance.setAttribute('readonly', 'true');
39142
- } else {
39143
- this.instance.removeAttribute('readonly');
39144
- }
39440
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(this.instance, 'readonly', isReadOnly ? 'true' : null);
39145
39441
  }
39146
39442
  selectAll() {
39147
39443
  this.instance.select();