jodit 4.17.0 → 4.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +23 -7
- package/es2015/jodit.min.js +3 -3
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.js +3 -3
- package/es2018/jodit.min.js +3 -3
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +4 -4
- package/es2021/jodit.js +23 -7
- package/es2021/jodit.min.js +4 -4
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +4 -4
- package/es2021.en/jodit.js +23 -7
- package/es2021.en/jodit.min.js +4 -4
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +23 -7
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/html/safe-html.d.ts +1 -1
- package/esm/core/helpers/html/safe-html.js +8 -1
- package/esm/plugins/drag-and-drop/drag-and-drop.js +16 -4
- package/package.json +1 -1
- package/types/core/helpers/html/safe-html.d.ts +1 -1
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.17.
|
|
4
|
+
* Version: v4.17.1
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2129,7 +2129,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2129
2129
|
* @packageDocumentation
|
|
2130
2130
|
* @module constants
|
|
2131
2131
|
*/
|
|
2132
|
-
var APP_VERSION = "4.17.
|
|
2132
|
+
var APP_VERSION = "4.17.1";
|
|
2133
2133
|
// prettier-ignore
|
|
2134
2134
|
var ES = "es5";
|
|
2135
2135
|
var IS_ES_MODERN = false;
|
|
@@ -7266,11 +7266,18 @@ function sanitizeHTMLElement(elm) {
|
|
|
7266
7266
|
var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
7267
7267
|
safeJavaScriptLink: true,
|
|
7268
7268
|
removeOnError: true
|
|
7269
|
-
}, safeJavaScriptLink = _ref.safeJavaScriptLink, removeOnError = _ref.removeOnError;
|
|
7269
|
+
}, safeJavaScriptLink = _ref.safeJavaScriptLink, removeOnError = _ref.removeOnError, removeEventAttributes = _ref.removeEventAttributes;
|
|
7270
7270
|
if (!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(elm)) {
|
|
7271
7271
|
return false;
|
|
7272
7272
|
}
|
|
7273
7273
|
var effected = false;
|
|
7274
|
+
// Every `on*` handler, not only `onerror`: the clean-html background
|
|
7275
|
+
// pass calls this directly, and markup that reached the editable area
|
|
7276
|
+
// without `safeHTML` (a drop, a script) kept its handlers otherwise.
|
|
7277
|
+
// See GHSA-jhhp-r3r7-v2cg
|
|
7278
|
+
if (removeEventAttributes && removeAllEventAttributes(elm)) {
|
|
7279
|
+
effected = true;
|
|
7280
|
+
}
|
|
7274
7281
|
if (removeOnError && elm.hasAttribute('onerror')) {
|
|
7275
7282
|
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'onerror', null);
|
|
7276
7283
|
effected = true;
|
|
@@ -37124,7 +37131,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.pluginSystem.add('dragAndDropElem
|
|
|
37124
37131
|
window,
|
|
37125
37132
|
this.j.ed,
|
|
37126
37133
|
this.j.editor
|
|
37127
|
-
], 'dragstart.DragAndDrop', this.onDragStart)
|
|
37134
|
+
], 'dragstart.DragAndDrop', this.onDragStart)// Always, not only after a `dragstart` seen in this window: a drop
|
|
37135
|
+
// from another window or application never produces one here, and
|
|
37136
|
+
// the browser then inserted its HTML natively, unsanitized. Routed
|
|
37137
|
+
// through the paste plugin instead. See GHSA-jhhp-r3r7-v2cg
|
|
37138
|
+
.on('drop.DragAndDrop', this.onDrop);
|
|
37128
37139
|
}
|
|
37129
37140
|
},
|
|
37130
37141
|
{
|
|
@@ -37160,13 +37171,13 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.pluginSystem.add('dragAndDropElem
|
|
|
37160
37171
|
{
|
|
37161
37172
|
key: "addDragListeners",
|
|
37162
37173
|
value: function addDragListeners() {
|
|
37163
|
-
this.j.e.on('dragover', this.onDrag).on(
|
|
37174
|
+
this.j.e.on('dragover', this.onDrag).on(window, 'dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop', this.onDragEnd);
|
|
37164
37175
|
}
|
|
37165
37176
|
},
|
|
37166
37177
|
{
|
|
37167
37178
|
key: "removeDragListeners",
|
|
37168
37179
|
value: function removeDragListeners() {
|
|
37169
|
-
this.j.e.off('dragover', this.onDrag).off(
|
|
37180
|
+
this.j.e.off('dragover', this.onDrag).off(window, 'dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop', this.onDragEnd);
|
|
37170
37181
|
}
|
|
37171
37182
|
},
|
|
37172
37183
|
{
|
|
@@ -37240,7 +37251,12 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.pluginSystem.add('dragAndDropElem
|
|
|
37240
37251
|
fragment = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_12__.dataBind)(this.draggable, 'target');
|
|
37241
37252
|
}
|
|
37242
37253
|
} else if (this.getText(event)) {
|
|
37243
|
-
|
|
37254
|
+
// Dropped markup takes the same sanitizing pass as pasted and
|
|
37255
|
+
// assigned content. See GHSA-jhhp-r3r7-v2cg
|
|
37256
|
+
var box = this.j.createInside.div();
|
|
37257
|
+
box.innerHTML = this.getText(event);
|
|
37258
|
+
this.j.e.fire('safeHTML', box);
|
|
37259
|
+
fragment = box.firstChild !== box.lastChild || !box.firstChild ? box : box.firstChild;
|
|
37244
37260
|
}
|
|
37245
37261
|
return fragment;
|
|
37246
37262
|
}
|
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.17.
|
|
4
|
+
* Version: v4.17.1
|
|
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.17.
|
|
11
|
+
* Version: v4.17.1
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|