jodit 4.14.5 → 4.14.6
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 +29 -9
- package/es2015/jodit.min.js +3 -3
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.js +3 -3
- package/es2018/jodit.min.js +3 -3
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +3 -3
- package/es2021/jodit.js +29 -9
- package/es2021/jodit.min.js +3 -3
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +3 -3
- package/es2021.en/jodit.js +29 -9
- package/es2021.en/jodit.min.js +3 -3
- 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 +29 -9
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/plugins/iframe/iframe.js +28 -9
- package/package.json +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.14.
|
|
4
|
+
* Version: v4.14.6
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2107,7 +2107,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2107
2107
|
* @packageDocumentation
|
|
2108
2108
|
* @module constants
|
|
2109
2109
|
*/
|
|
2110
|
-
var APP_VERSION = "4.14.
|
|
2110
|
+
var APP_VERSION = "4.14.6";
|
|
2111
2111
|
// prettier-ignore
|
|
2112
2112
|
var ES = "es5";
|
|
2113
2113
|
var IS_ES_MODERN = false;
|
|
@@ -38808,6 +38808,25 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
38808
38808
|
}
|
|
38809
38809
|
return html;
|
|
38810
38810
|
};
|
|
38811
|
+
/**
|
|
38812
|
+
* Replace the whole iframe document with the given HTML.
|
|
38813
|
+
*
|
|
38814
|
+
* The markup is parsed in an inert document first (no browsing
|
|
38815
|
+
* context: scripts do not run, sub-resources are not fetched),
|
|
38816
|
+
* sanitized there via `safeHTML`, and only then moved into the
|
|
38817
|
+
* live document. `document.write` on the live document would
|
|
38818
|
+
* execute inline scripts and event handlers while parsing,
|
|
38819
|
+
* before the sanitizer had a chance to strip them, and the
|
|
38820
|
+
* iframe is same-origin with the host page by default.
|
|
38821
|
+
* A `<script>` the cleaner is configured to keep still never
|
|
38822
|
+
* executes: nodes coming from an inert parser are flagged
|
|
38823
|
+
* "already started", exactly like `innerHTML`.
|
|
38824
|
+
* See GHSA-w3xv-x3fm-59ph.
|
|
38825
|
+
*/ var replaceDocument = function replaceDocument(html) {
|
|
38826
|
+
var inert = new DOMParser().parseFromString(html, 'text/html');
|
|
38827
|
+
editor.e.fire('safeHTML', inert.documentElement);
|
|
38828
|
+
doc.replaceChild(doc.adoptNode(inert.documentElement), doc.documentElement);
|
|
38829
|
+
};
|
|
38811
38830
|
if (docMode) {
|
|
38812
38831
|
var tag = editor.element.tagName;
|
|
38813
38832
|
if (tag !== 'TEXTAREA' && tag !== 'INPUT') {
|
|
@@ -38823,19 +38842,20 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
38823
38842
|
if (/<(html|body)/i.test(value)) {
|
|
38824
38843
|
var old = doc.documentElement.outerHTML;
|
|
38825
38844
|
if (clearMarkers(old) !== clearMarkers(value)) {
|
|
38826
|
-
|
|
38827
|
-
doc.write(editor.o.iframeDoctype + clearMarkers(value));
|
|
38828
|
-
doc.close();
|
|
38845
|
+
replaceDocument(clearMarkers(value));
|
|
38829
38846
|
editor.editor = doc.body;
|
|
38830
|
-
editor.e.fire('safeHTML', editor.editor);
|
|
38831
38847
|
toggleEditable();
|
|
38832
38848
|
editor.e.fire('prepareWYSIWYGEditor');
|
|
38833
38849
|
editor.e.stopPropagation('beforeSetNativeEditorValue');
|
|
38834
38850
|
}
|
|
38835
|
-
|
|
38836
|
-
doc.body.innerHTML = value;
|
|
38851
|
+
return true;
|
|
38837
38852
|
}
|
|
38838
|
-
|
|
38853
|
+
// A partial value goes through the regular
|
|
38854
|
+
// path: `clean-html` sanitizes it and the
|
|
38855
|
+
// editor assigns it to `doc.body` via
|
|
38856
|
+
// `innerHTML`. Writing the raw value here
|
|
38857
|
+
// would fire its event handlers first.
|
|
38858
|
+
return false;
|
|
38839
38859
|
}, {
|
|
38840
38860
|
top: true
|
|
38841
38861
|
});
|
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.14.
|
|
4
|
+
* Version: v4.14.6
|
|
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.14.
|
|
11
|
+
* Version: v4.14.6
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|