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/es2015/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
  */
@@ -1764,7 +1764,7 @@ __webpack_require__.r(__webpack_exports__);
1764
1764
  * ```
1765
1765
  * @packageDocumentation
1766
1766
  * @module constants
1767
- */ const APP_VERSION = "4.10.3";
1767
+ */ const APP_VERSION = "4.11.3";
1768
1768
  // prettier-ignore
1769
1769
  const ES = "es2015";
1770
1770
  const IS_ES_MODERN = true;
@@ -5954,17 +5954,54 @@ function normalizeCSS(s) {
5954
5954
  /**
5955
5955
  * Removes dangerous constructs from HTML
5956
5956
  */ function safeHTML(box, options) {
5957
+ var _options_removeEventAttributes;
5957
5958
  if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(box) && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isFragment(box)) {
5958
5959
  return;
5959
5960
  }
5960
- if (options.removeOnError) {
5961
- sanitizeHTMLElement(box);
5961
+ const removeEvents = (_options_removeEventAttributes = options.removeEventAttributes) !== null && _options_removeEventAttributes !== void 0 ? _options_removeEventAttributes : options.removeOnError;
5962
+ if (removeEvents) {
5963
+ removeAllEventAttributes(box);
5964
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.$$)('*', box).forEach((elm)=>removeAllEventAttributes(elm));
5965
+ } else if (options.removeOnError) {
5966
+ sanitizeHTMLElement(box, options);
5962
5967
  (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.$$)('[onerror]', box).forEach((elm)=>sanitizeHTMLElement(elm, options));
5963
5968
  }
5964
5969
  if (options.safeJavaScriptLink) {
5965
- sanitizeHTMLElement(box);
5970
+ sanitizeHTMLElement(box, options);
5966
5971
  (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.$$)('a[href^="javascript"]', box).forEach((elm)=>sanitizeHTMLElement(elm, options));
5967
5972
  }
5973
+ if (options.safeLinksTarget) {
5974
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.$$)('a[target="_blank"]', box).forEach((elm)=>{
5975
+ const rel = elm.getAttribute('rel') || '';
5976
+ const parts = rel.split(/\s+/).filter(Boolean);
5977
+ if (!parts.includes('noopener')) {
5978
+ parts.push('noopener');
5979
+ }
5980
+ if (!parts.includes('noreferrer')) {
5981
+ parts.push('noreferrer');
5982
+ }
5983
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'rel', parts.join(' '));
5984
+ });
5985
+ }
5986
+ }
5987
+ /**
5988
+ * Remove all on* event handler attributes from an element
5989
+ */ function removeAllEventAttributes(elm) {
5990
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(elm)) {
5991
+ return false;
5992
+ }
5993
+ let effected = false;
5994
+ const toRemove = [];
5995
+ for(let i = 0; i < elm.attributes.length; i++){
5996
+ if (elm.attributes[i].name.toLowerCase().startsWith('on')) {
5997
+ toRemove.push(elm.attributes[i].name);
5998
+ }
5999
+ }
6000
+ for (const name of toRemove){
6001
+ elm.removeAttribute(name);
6002
+ effected = true;
6003
+ }
6004
+ return effected;
5968
6005
  }
5969
6006
  function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = {
5970
6007
  safeJavaScriptLink: true,
@@ -26852,6 +26889,10 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
26852
26889
  return false;
26853
26890
  }
26854
26891
  onSafeHTML(sandBox) {
26892
+ const sanitizer = this.j.o.cleanHTML.sanitizer;
26893
+ if (sanitizer) {
26894
+ sandBox.innerHTML = sanitizer(sandBox.innerHTML);
26895
+ }
26855
26896
  (0,jodit_core_helpers_html_safe_html__WEBPACK_IMPORTED_MODULE_6__.safeHTML)(sandBox, this.j.o.cleanHTML);
26856
26897
  }
26857
26898
  /** @override */ beforeDestruct() {
@@ -26921,10 +26962,19 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.cleanHTML = {
26921
26962
  b: 'strong'
26922
26963
  },
26923
26964
  allowTags: false,
26924
- denyTags: 'script',
26965
+ denyTags: 'script,iframe,object,embed',
26925
26966
  useIframeSandbox: false,
26926
26967
  removeOnError: true,
26968
+ removeEventAttributes: true,
26927
26969
  safeJavaScriptLink: true,
26970
+ safeLinksTarget: true,
26971
+ allowedStyles: false,
26972
+ sanitizer: false,
26973
+ sandboxIframesInContent: true,
26974
+ convertUnsafeEmbeds: [
26975
+ 'object',
26976
+ 'embed'
26977
+ ],
26928
26978
  disableCleanFilter: null
26929
26979
  };
26930
26980
  jodit_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.eraser = {
@@ -27186,6 +27236,56 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__.Icon.set('eraser', (_eraser_svg_
27186
27236
  }
27187
27237
 
27188
27238
 
27239
+ /***/ }),
27240
+
27241
+ /***/ 85085:
27242
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
27243
+
27244
+ "use strict";
27245
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27246
+ /* harmony export */ convertUnsafeEmbeds: function() { return /* binding */ convertUnsafeEmbeds; }
27247
+ /* harmony export */ });
27248
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
27249
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
27250
+ /*!
27251
+ * Jodit Editor (https://xdsoft.net/jodit/)
27252
+ * Released under MIT see LICENSE.txt in the project root for license information.
27253
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
27254
+ */ /**
27255
+ * @module plugins/clean-html
27256
+ */
27257
+
27258
+ /**
27259
+ * Convert `<object>` and `<embed>` elements to safer `<iframe>` elements.
27260
+ * @private
27261
+ */ function convertUnsafeEmbeds(jodit, nodeElm, hadEffect) {
27262
+ const opt = jodit.o.cleanHTML.convertUnsafeEmbeds;
27263
+ if (!opt || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm)) {
27264
+ return hadEffect;
27265
+ }
27266
+ const tag = nodeElm.nodeName.toLowerCase();
27267
+ if (!opt.includes(tag)) {
27268
+ return hadEffect;
27269
+ }
27270
+ const elm = nodeElm;
27271
+ 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') || '';
27272
+ if (!src) {
27273
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(elm);
27274
+ return true;
27275
+ }
27276
+ const iframe = jodit.createInside.element('iframe');
27277
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(iframe, {
27278
+ src,
27279
+ sandbox: '',
27280
+ frameborder: '0',
27281
+ width: (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'width'),
27282
+ height: (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'height')
27283
+ });
27284
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.replace(elm, iframe, undefined, false, true);
27285
+ return true;
27286
+ }
27287
+
27288
+
27189
27289
  /***/ }),
27190
27290
 
27191
27291
  /***/ 39188:
@@ -27233,20 +27333,28 @@ const TABLE_CONTAINER_TAGS = new Set([
27233
27333
  __webpack_require__.r(__webpack_exports__);
27234
27334
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27235
27335
  /* harmony export */ allowAttributes: function() { return /* reexport safe */ _allow_attributes__WEBPACK_IMPORTED_MODULE_0__.allowAttributes; },
27236
- /* harmony export */ fillEmptyParagraph: function() { return /* reexport safe */ _fill_empty_paragraph__WEBPACK_IMPORTED_MODULE_1__.fillEmptyParagraph; },
27237
- /* harmony export */ removeEmptyTextNode: function() { return /* reexport safe */ _remove_empty_text_node__WEBPACK_IMPORTED_MODULE_2__.removeEmptyTextNode; },
27238
- /* harmony export */ removeInvTextNodes: function() { return /* reexport safe */ _remove_inv_text_nodes__WEBPACK_IMPORTED_MODULE_3__.removeInvTextNodes; },
27239
- /* harmony export */ replaceOldTags: function() { return /* reexport safe */ _replace_old_tags__WEBPACK_IMPORTED_MODULE_4__.replaceOldTags; },
27240
- /* harmony export */ sanitizeAttributes: function() { return /* reexport safe */ _sanitize_attributes__WEBPACK_IMPORTED_MODULE_5__.sanitizeAttributes; },
27241
- /* harmony export */ tryRemoveNode: function() { return /* reexport safe */ _try_remove_node__WEBPACK_IMPORTED_MODULE_6__.tryRemoveNode; }
27336
+ /* harmony export */ convertUnsafeEmbeds: function() { return /* reexport safe */ _convert_unsafe_embeds__WEBPACK_IMPORTED_MODULE_1__.convertUnsafeEmbeds; },
27337
+ /* harmony export */ fillEmptyParagraph: function() { return /* reexport safe */ _fill_empty_paragraph__WEBPACK_IMPORTED_MODULE_2__.fillEmptyParagraph; },
27338
+ /* harmony export */ removeEmptyTextNode: function() { return /* reexport safe */ _remove_empty_text_node__WEBPACK_IMPORTED_MODULE_3__.removeEmptyTextNode; },
27339
+ /* harmony export */ removeInvTextNodes: function() { return /* reexport safe */ _remove_inv_text_nodes__WEBPACK_IMPORTED_MODULE_4__.removeInvTextNodes; },
27340
+ /* harmony export */ replaceOldTags: function() { return /* reexport safe */ _replace_old_tags__WEBPACK_IMPORTED_MODULE_5__.replaceOldTags; },
27341
+ /* harmony export */ safeLinksTarget: function() { return /* reexport safe */ _safe_links_target__WEBPACK_IMPORTED_MODULE_6__.safeLinksTarget; },
27342
+ /* harmony export */ sandboxIframesInContent: function() { return /* reexport safe */ _sandbox_iframes_in_content__WEBPACK_IMPORTED_MODULE_7__.sandboxIframesInContent; },
27343
+ /* harmony export */ sanitizeAttributes: function() { return /* reexport safe */ _sanitize_attributes__WEBPACK_IMPORTED_MODULE_8__.sanitizeAttributes; },
27344
+ /* harmony export */ sanitizeStyles: function() { return /* reexport safe */ _sanitize_styles__WEBPACK_IMPORTED_MODULE_9__.sanitizeStyles; },
27345
+ /* harmony export */ tryRemoveNode: function() { return /* reexport safe */ _try_remove_node__WEBPACK_IMPORTED_MODULE_10__.tryRemoveNode; }
27242
27346
  /* harmony export */ });
27243
27347
  /* harmony import */ var _allow_attributes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95559);
27244
- /* harmony import */ var _fill_empty_paragraph__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39188);
27245
- /* harmony import */ var _remove_empty_text_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94561);
27246
- /* harmony import */ var _remove_inv_text_nodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53514);
27247
- /* harmony import */ var _replace_old_tags__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35104);
27248
- /* harmony import */ var _sanitize_attributes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65015);
27249
- /* harmony import */ var _try_remove_node__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(27611);
27348
+ /* harmony import */ var _convert_unsafe_embeds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85085);
27349
+ /* harmony import */ var _fill_empty_paragraph__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39188);
27350
+ /* harmony import */ var _remove_empty_text_node__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94561);
27351
+ /* harmony import */ var _remove_inv_text_nodes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53514);
27352
+ /* harmony import */ var _replace_old_tags__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(35104);
27353
+ /* harmony import */ var _safe_links_target__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(77041);
27354
+ /* harmony import */ var _sandbox_iframes_in_content__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(66647);
27355
+ /* harmony import */ var _sanitize_attributes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65015);
27356
+ /* harmony import */ var _sanitize_styles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(60220);
27357
+ /* harmony import */ var _try_remove_node__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(27611);
27250
27358
  /*!
27251
27359
  * Jodit Editor (https://xdsoft.net/jodit/)
27252
27360
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -27264,6 +27372,10 @@ __webpack_require__.r(__webpack_exports__);
27264
27372
 
27265
27373
 
27266
27374
 
27375
+
27376
+
27377
+
27378
+
27267
27379
  /***/ }),
27268
27380
 
27269
27381
  /***/ 94561:
@@ -27380,6 +27492,90 @@ __webpack_require__.r(__webpack_exports__);
27380
27492
  }
27381
27493
 
27382
27494
 
27495
+ /***/ }),
27496
+
27497
+ /***/ 77041:
27498
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
27499
+
27500
+ "use strict";
27501
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27502
+ /* harmony export */ safeLinksTarget: function() { return /* binding */ safeLinksTarget; }
27503
+ /* harmony export */ });
27504
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
27505
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
27506
+ /*!
27507
+ * Jodit Editor (https://xdsoft.net/jodit/)
27508
+ * Released under MIT see LICENSE.txt in the project root for license information.
27509
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
27510
+ */ /**
27511
+ * @module plugins/clean-html
27512
+ */
27513
+
27514
+ /**
27515
+ * Automatically add `rel="noopener noreferrer"` to links with `target="_blank"`
27516
+ * @private
27517
+ */ function safeLinksTarget(jodit, nodeElm, hadEffect) {
27518
+ if (!jodit.o.cleanHTML.safeLinksTarget || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm) || nodeElm.nodeName !== 'A') {
27519
+ return hadEffect;
27520
+ }
27521
+ const elm = nodeElm;
27522
+ if ((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'target') !== '_blank') {
27523
+ return hadEffect;
27524
+ }
27525
+ const rel = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'rel') || '';
27526
+ const parts = rel.split(/\s+/).filter(Boolean);
27527
+ let changed = false;
27528
+ if (!parts.includes('noopener')) {
27529
+ parts.push('noopener');
27530
+ changed = true;
27531
+ }
27532
+ if (!parts.includes('noreferrer')) {
27533
+ parts.push('noreferrer');
27534
+ changed = true;
27535
+ }
27536
+ if (changed) {
27537
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'rel', parts.join(' '));
27538
+ return true;
27539
+ }
27540
+ return hadEffect;
27541
+ }
27542
+
27543
+
27544
+ /***/ }),
27545
+
27546
+ /***/ 66647:
27547
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
27548
+
27549
+ "use strict";
27550
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27551
+ /* harmony export */ sandboxIframesInContent: function() { return /* binding */ sandboxIframesInContent; }
27552
+ /* harmony export */ });
27553
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
27554
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
27555
+ /*!
27556
+ * Jodit Editor (https://xdsoft.net/jodit/)
27557
+ * Released under MIT see LICENSE.txt in the project root for license information.
27558
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
27559
+ */ /**
27560
+ * @module plugins/clean-html
27561
+ */
27562
+
27563
+ /**
27564
+ * Add `sandbox=""` attribute to all `<iframe>` elements in the editor content
27565
+ * @private
27566
+ */ function sandboxIframesInContent(jodit, nodeElm, hadEffect) {
27567
+ if (!jodit.o.cleanHTML.sandboxIframesInContent || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm) || nodeElm.nodeName !== 'IFRAME') {
27568
+ return hadEffect;
27569
+ }
27570
+ const elm = nodeElm;
27571
+ if (!elm.hasAttribute('sandbox')) {
27572
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'sandbox', '');
27573
+ return true;
27574
+ }
27575
+ return hadEffect;
27576
+ }
27577
+
27578
+
27383
27579
  /***/ }),
27384
27580
 
27385
27581
  /***/ 65015:
@@ -27402,9 +27598,15 @@ __webpack_require__.r(__webpack_exports__);
27402
27598
  /**
27403
27599
  * @private
27404
27600
  */ function sanitizeAttributes(jodit, nodeElm, hadEffect) {
27405
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm) && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.sanitizeHTMLElement)(nodeElm, {
27406
- safeJavaScriptLink: jodit.options.cleanHTML.safeJavaScriptLink,
27407
- removeOnError: jodit.options.cleanHTML.removeOnError
27601
+ if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm)) {
27602
+ return hadEffect;
27603
+ }
27604
+ const opts = jodit.options.cleanHTML;
27605
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.sanitizeHTMLElement)(nodeElm, {
27606
+ safeJavaScriptLink: opts.safeJavaScriptLink,
27607
+ removeOnError: opts.removeOnError,
27608
+ removeEventAttributes: opts.removeEventAttributes,
27609
+ safeLinksTarget: opts.safeLinksTarget
27408
27610
  })) {
27409
27611
  return true;
27410
27612
  }
@@ -27412,6 +27614,84 @@ __webpack_require__.r(__webpack_exports__);
27412
27614
  }
27413
27615
 
27414
27616
 
27617
+ /***/ }),
27618
+
27619
+ /***/ 60220:
27620
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
27621
+
27622
+ "use strict";
27623
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27624
+ /* harmony export */ sanitizeStyles: function() { return /* binding */ sanitizeStyles; }
27625
+ /* harmony export */ });
27626
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
27627
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
27628
+ /*!
27629
+ * Jodit Editor (https://xdsoft.net/jodit/)
27630
+ * Released under MIT see LICENSE.txt in the project root for license information.
27631
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
27632
+ */ /**
27633
+ * @module plugins/clean-html
27634
+ */
27635
+
27636
+ /**
27637
+ * Filter CSS properties in style attributes based on allowedStyles whitelist
27638
+ * @private
27639
+ */ function sanitizeStyles(jodit, nodeElm, hadEffect) {
27640
+ const allowedStyles = jodit.o.cleanHTML.allowedStyles;
27641
+ if (!allowedStyles || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(nodeElm)) {
27642
+ return hadEffect;
27643
+ }
27644
+ const elm = nodeElm;
27645
+ const style = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style');
27646
+ if (!style) {
27647
+ return hadEffect;
27648
+ }
27649
+ const tagName = nodeElm.nodeName.toLowerCase();
27650
+ const allowed = getAllowedPropsForTag(tagName, allowedStyles);
27651
+ if (!allowed) {
27652
+ return hadEffect;
27653
+ }
27654
+ const filtered = filterStyleProperties(style, allowed);
27655
+ if (filtered !== style) {
27656
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style', filtered || null);
27657
+ return true;
27658
+ }
27659
+ return hadEffect;
27660
+ }
27661
+ function getAllowedPropsForTag(tagName, allowedStyles) {
27662
+ const tagSpecific = allowedStyles[tagName];
27663
+ const global = allowedStyles['*'];
27664
+ if (!tagSpecific && !global) {
27665
+ return null;
27666
+ }
27667
+ const set = new Set();
27668
+ if (global) {
27669
+ for (const prop of global){
27670
+ set.add(prop.toLowerCase());
27671
+ }
27672
+ }
27673
+ if (tagSpecific) {
27674
+ for (const prop of tagSpecific){
27675
+ set.add(prop.toLowerCase());
27676
+ }
27677
+ }
27678
+ return set;
27679
+ }
27680
+ function filterStyleProperties(style, allowed) {
27681
+ return style.split(';').map((s)=>s.trim()).filter((s)=>{
27682
+ if (!s) {
27683
+ return false;
27684
+ }
27685
+ const colonIdx = s.indexOf(':');
27686
+ if (colonIdx === -1) {
27687
+ return false;
27688
+ }
27689
+ const prop = s.substring(0, colonIdx).trim().toLowerCase();
27690
+ return allowed.has(prop);
27691
+ }).join('; ').replace(/;\s*$/, '');
27692
+ }
27693
+
27694
+
27415
27695
  /***/ }),
27416
27696
 
27417
27697
  /***/ 27611:
@@ -28864,7 +29144,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('dragAndDropElem
28864
29144
  'src'
28865
29145
  ];
28866
29146
  fragment = this.j.createInside.element(tagName);
28867
- 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') || '');
29147
+ (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') || '');
28868
29148
  if (tagName === 'a') {
28869
29149
  fragment.textContent = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(fragment, field) || '';
28870
29150
  }
@@ -29484,7 +29764,8 @@ function brBefore(start) {
29484
29764
  /* harmony export */ insertParagraph: function() { return /* binding */ insertParagraph; }
29485
29765
  /* harmony export */ });
29486
29766
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
29487
- /* harmony import */ var jodit_core_helpers_utils_scroll_into_view__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60898);
29767
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7909);
29768
+ /* harmony import */ var jodit_core_helpers_utils_scroll_into_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60898);
29488
29769
  /*!
29489
29770
  * Jodit Editor (https://xdsoft.net/jodit/)
29490
29771
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -29493,6 +29774,7 @@ function brBefore(start) {
29493
29774
  * @module plugins/enter
29494
29775
  */
29495
29776
 
29777
+
29496
29778
  /**
29497
29779
  * Insert default paragraph
29498
29780
  * @private
@@ -29502,11 +29784,11 @@ function brBefore(start) {
29502
29784
  p.appendChild(br);
29503
29785
  }
29504
29786
  if (style && style.cssText) {
29505
- p.setAttribute('style', style.cssText);
29787
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(p, 'style', style.cssText);
29506
29788
  }
29507
29789
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.after(fake, p);
29508
29790
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.before(isBR ? p : br, fake);
29509
- (0,jodit_core_helpers_utils_scroll_into_view__WEBPACK_IMPORTED_MODULE_1__.scrollIntoViewIfNeeded)(p, editor.editor, editor.ed);
29791
+ (0,jodit_core_helpers_utils_scroll_into_view__WEBPACK_IMPORTED_MODULE_2__.scrollIntoViewIfNeeded)(p, editor.editor, editor.ed);
29510
29792
  return p;
29511
29793
  }
29512
29794
 
@@ -29696,8 +29978,9 @@ function brBefore(start) {
29696
29978
  /* unused harmony export file */
29697
29979
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
29698
29980
  /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28077);
29699
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5266);
29700
- /* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15753);
29981
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7909);
29982
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5266);
29983
+ /* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15753);
29701
29984
  /*!
29702
29985
  * Jodit Editor (https://xdsoft.net/jodit/)
29703
29986
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -29710,7 +29993,8 @@ function brBefore(start) {
29710
29993
 
29711
29994
 
29712
29995
 
29713
- jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.file = {
29996
+
29997
+ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.file = {
29714
29998
  popup: (editor, current, close)=>{
29715
29999
  const insert = (url, title = '')=>{
29716
30000
  editor.s.insertNode(editor.createInside.fromHTML(`<a href="${url}" title="${title}">${title || url}</a>`));
@@ -29719,7 +30003,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.file = {
29719
30003
  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))) {
29720
30004
  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);
29721
30005
  }
29722
- return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_3__.FileSelectorWidget)(editor, {
30006
+ return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__.FileSelectorWidget)(editor, {
29723
30007
  filebrowser: (data)=>{
29724
30008
  data.files && data.files.forEach((file)=>insert(data.baseurl + file));
29725
30009
  close();
@@ -29727,8 +30011,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.file = {
29727
30011
  upload: true,
29728
30012
  url: (url, text)=>{
29729
30013
  if (sourceAnchor) {
29730
- sourceAnchor.setAttribute('href', url);
29731
- sourceAnchor.setAttribute('title', text);
30014
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(sourceAnchor, 'href', url);
30015
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(sourceAnchor, 'title', text);
29732
30016
  } else {
29733
30017
  insert(url, text);
29734
30018
  }
@@ -30604,8 +30888,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
30604
30888
  if (opt.iframeCSSLinks) {
30605
30889
  opt.iframeCSSLinks.forEach((href)=>{
30606
30890
  const link = doc.createElement('link');
30607
- link.setAttribute('rel', 'stylesheet');
30608
- link.setAttribute('href', href);
30891
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'rel', 'stylesheet');
30892
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(link, 'href', href);
30609
30893
  doc.head && doc.head.appendChild(link);
30610
30894
  });
30611
30895
  }
@@ -30622,11 +30906,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
30622
30906
  iframe.style.display = 'block';
30623
30907
  iframe.src = 'about:blank';
30624
30908
  iframe.className = 'jodit-wysiwyg_iframe';
30625
- iframe.setAttribute('allowtransparency', 'true');
30626
- iframe.setAttribute('tabindex', opt.tabIndex.toString());
30627
- iframe.setAttribute('frameborder', '0');
30909
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(iframe, {
30910
+ allowtransparency: 'true',
30911
+ tabindex: opt.tabIndex.toString(),
30912
+ frameborder: '0'
30913
+ });
30628
30914
  if (opt.iframeSandbox != null) {
30629
- iframe.setAttribute('sandbox', opt.iframeSandbox);
30915
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.attr)(iframe, 'sandbox', opt.iframeSandbox);
30630
30916
  }
30631
30917
  editor.workplace.appendChild(iframe);
30632
30918
  editor.iframe = iframe;
@@ -32339,6 +32625,10 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__
32339
32625
  }
32340
32626
  (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'href', imageLink);
32341
32627
  (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'target', imageLinkOpenInNewTab ? '_blank' : null);
32628
+ if (!imageLinkOpenInNewTab) {
32629
+ const relParts = ((0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel') || '').split(/\s+/).filter((p)=>p && p !== 'noopener' && p !== 'noreferrer');
32630
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_1__.attr)(link, 'rel', relParts.length ? relParts.join(' ') : null);
32631
+ }
32342
32632
  } else {
32343
32633
  if (link && link.parentNode) {
32344
32634
  link.parentNode.replaceChild(image, link);
@@ -32449,11 +32739,12 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__
32449
32739
  /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27795);
32450
32740
  /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28077);
32451
32741
  /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65946);
32452
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29434);
32453
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5266);
32454
- /* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(15753);
32455
- /* harmony import */ var _image_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(64831);
32456
- /* harmony import */ var _image_svg__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_image_svg__WEBPACK_IMPORTED_MODULE_7__);
32742
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7909);
32743
+ /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29434);
32744
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5266);
32745
+ /* harmony import */ var jodit_modules_widget__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(15753);
32746
+ /* harmony import */ var _image_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(64831);
32747
+ /* harmony import */ var _image_svg__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_image_svg__WEBPACK_IMPORTED_MODULE_8__);
32457
32748
  /*!
32458
32749
  * Jodit Editor (https://xdsoft.net/jodit/)
32459
32750
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -32470,15 +32761,16 @@ UIImagePositionTab = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__
32470
32761
 
32471
32762
 
32472
32763
 
32473
- jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__.Icon.set('image', (_image_svg__WEBPACK_IMPORTED_MODULE_7___default()));
32474
- jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.image = {
32764
+
32765
+ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('image', (_image_svg__WEBPACK_IMPORTED_MODULE_8___default()));
32766
+ jodit_config__WEBPACK_IMPORTED_MODULE_6__.Config.prototype.controls.image = {
32475
32767
  popup: (editor, current, close)=>{
32476
32768
  let sourceImage = null;
32477
32769
  if (current && !jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(current) && jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isHTMLElement(current) && (jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(current, 'img') || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.$$)('img', current).length)) {
32478
32770
  sourceImage = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(current, 'img') ? current : (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.$$)('img', current)[0];
32479
32771
  }
32480
32772
  editor.s.save();
32481
- return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_6__.FileSelectorWidget)(editor, {
32773
+ return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_7__.FileSelectorWidget)(editor, {
32482
32774
  filebrowser: (data)=>{
32483
32775
  editor.s.restore();
32484
32776
  data.files && data.files.forEach((file)=>editor.s.insertImage(data.baseurl + file, null, editor.o.imageDefaultWidth));
@@ -32491,8 +32783,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.image = {
32491
32783
  url = '//' + url;
32492
32784
  }
32493
32785
  const image = sourceImage || editor.createInside.element('img');
32494
- image.setAttribute('src', url);
32495
- image.setAttribute('alt', text);
32786
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'src', url);
32787
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'alt', text);
32496
32788
  if (!sourceImage) {
32497
32789
  yield editor.s.insertImage(image, null, editor.o.imageDefaultWidth);
32498
32790
  }
@@ -34507,7 +34799,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
34507
34799
  }
34508
34800
  if (jodit.s.isCollapsed()) {
34509
34801
  const a = jodit.createInside.element('a');
34510
- a.setAttribute('href', html);
34802
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'href', html);
34511
34803
  a.textContent = html;
34512
34804
  jodit.e.fire('applyLink', jodit, a, null);
34513
34805
  return a;
@@ -34567,7 +34859,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
34567
34859
  target_checkbox.checked = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'target') === '_blank';
34568
34860
  }
34569
34861
  if (noFollowCheckbox && nofollow_checkbox) {
34570
- nofollow_checkbox.checked = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'rel') === 'nofollow';
34862
+ nofollow_checkbox.checked = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(link, 'rel') || '').split(/\s+/).includes('nofollow');
34571
34863
  }
34572
34864
  insert.textContent = i18n('Update');
34573
34865
  } else {
@@ -34633,7 +34925,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.link = {
34633
34925
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'target', target_checkbox.checked ? '_blank' : null);
34634
34926
  }
34635
34927
  if (noFollowCheckbox && nofollow_checkbox) {
34636
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'rel', nofollow_checkbox.checked ? 'nofollow' : null);
34928
+ const relParts = ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'rel') || '').split(/\s+/).filter(Boolean);
34929
+ const hasNofollow = relParts.includes('nofollow');
34930
+ if (nofollow_checkbox.checked && !hasNofollow) {
34931
+ relParts.push('nofollow');
34932
+ } else if (!nofollow_checkbox.checked && hasNofollow) {
34933
+ relParts.splice(relParts.indexOf('nofollow'), 1);
34934
+ }
34935
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.attr)(a, 'rel', relParts.length ? relParts.join(' ') : null);
34637
34936
  }
34638
34937
  jodit.e.fire('applyLink', jodit, a, form);
34639
34938
  });
@@ -37275,8 +37574,8 @@ const keyBInd = '__jodit-resizer_binded';
37275
37574
  this.j.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', ()=>{
37276
37575
  this.j.s.select(element);
37277
37576
  }).off(element, 'changesize').on(element, 'changesize', ()=>{
37278
- iframe.setAttribute('width', element.offsetWidth + 'px');
37279
- iframe.setAttribute('height', element.offsetHeight + 'px');
37577
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'width', element.offsetWidth + 'px');
37578
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.attr)(iframe, 'height', element.offsetHeight + 'px');
37280
37579
  });
37281
37580
  }
37282
37581
  this.j.e.on(element, 'dragstart', this.hide);
@@ -39346,8 +39645,9 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
39346
39645
  /* harmony export */ });
39347
39646
  /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
39348
39647
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
39349
- /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(80991);
39350
- /* harmony import */ var jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94193);
39648
+ /* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7909);
39649
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80991);
39650
+ /* harmony import */ var jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94193);
39351
39651
  /*!
39352
39652
  * Jodit Editor (https://xdsoft.net/jodit/)
39353
39653
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -39358,7 +39658,8 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
39358
39658
 
39359
39659
 
39360
39660
 
39361
- class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORTED_MODULE_3__.SourceEditor {
39661
+
39662
+ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORTED_MODULE_4__.SourceEditor {
39362
39663
  init(editor) {
39363
39664
  this.instance = editor.c.element('textarea', {
39364
39665
  class: 'jodit-source__mirror',
@@ -39366,7 +39667,7 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
39366
39667
  });
39367
39668
  this.container.appendChild(this.instance);
39368
39669
  editor.e.on(this.instance, 'mousedown keydown touchstart input', editor.async.debounce(this.toWYSIWYG, editor.defaultTimeout)).on('setMinHeight.source', (minHeightD)=>{
39369
- (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__.css)(this.instance, 'minHeight', minHeightD);
39670
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__.css)(this.instance, 'minHeight', minHeightD);
39370
39671
  }).on(this.instance, 'change keydown mousedown touchstart input', this.autosize).on('afterSetMode.source', this.autosize).on(this.instance, 'mousedown focus', (e)=>{
39371
39672
  editor.e.fire(e.type, e);
39372
39673
  });
@@ -39410,14 +39711,10 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
39410
39711
  this.instance.blur();
39411
39712
  }
39412
39713
  setPlaceHolder(title) {
39413
- this.instance.setAttribute('placeholder', title);
39714
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(this.instance, 'placeholder', title);
39414
39715
  }
39415
39716
  setReadOnly(isReadOnly) {
39416
- if (isReadOnly) {
39417
- this.instance.setAttribute('readonly', 'true');
39418
- } else {
39419
- this.instance.removeAttribute('readonly');
39420
- }
39717
+ (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(this.instance, 'readonly', isReadOnly ? 'true' : null);
39421
39718
  }
39422
39719
  selectAll() {
39423
39720
  this.instance.select();