jodit 4.12.30 → 4.12.32
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 +12 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +20 -6
- 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 +19 -5
- 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 +19 -5
- 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 +21 -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.js +9 -2
- package/esm/plugins/size/size.js +11 -4
- package/package.json +1 -1
package/es5/polyfills.fat.min.js
CHANGED
package/es5/polyfills.js
CHANGED
package/es5/polyfills.min.js
CHANGED
package/esm/core/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
export const APP_VERSION = "4.12.
|
|
6
|
+
export const APP_VERSION = "4.12.32";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -150,8 +150,16 @@ export function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } =
|
|
|
150
150
|
attr(elm, 'onerror', null);
|
|
151
151
|
effected = true;
|
|
152
152
|
}
|
|
153
|
+
const tagName = elm.nodeName.toLowerCase();
|
|
153
154
|
const href = elm.getAttribute('href');
|
|
154
|
-
|
|
155
|
+
// Neutralize executable-scheme `href`s with the same normalization used for
|
|
156
|
+
// every other URL attribute (`isDangerousUrl`), which strips control bytes,
|
|
157
|
+
// tabs and newlines and lowercases before matching the scheme. The previous
|
|
158
|
+
// bare `href.trim().indexOf('javascript') === 0` was case-sensitive and
|
|
159
|
+
// missed `JAVASCRIPT:`, a leading control byte, or a tab/newline inside the
|
|
160
|
+
// scheme (e.g. `java\tscript:`) — all of which the browser still resolves to
|
|
161
|
+
// `javascript:` on click. See GHSA-j839-gqq4-gf9j.
|
|
162
|
+
if (safeJavaScriptLink && href && isDangerousUrl(href, tagName)) {
|
|
155
163
|
attr(elm, 'href', location.protocol + '//' + href);
|
|
156
164
|
effected = true;
|
|
157
165
|
}
|
|
@@ -162,7 +170,6 @@ export function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } =
|
|
|
162
170
|
effected = true;
|
|
163
171
|
}
|
|
164
172
|
// Strip executable schemes from any other URL-bearing attribute.
|
|
165
|
-
const tagName = elm.nodeName.toLowerCase();
|
|
166
173
|
for (const name of URL_ATTRIBUTES) {
|
|
167
174
|
const value = elm.getAttribute(name);
|
|
168
175
|
if (value && isDangerousUrl(value, tagName)) {
|
package/esm/plugins/size/size.js
CHANGED
|
@@ -116,10 +116,17 @@ export class size extends Plugin {
|
|
|
116
116
|
* Returns service spaces: toolbar + statusbar
|
|
117
117
|
*/
|
|
118
118
|
__getNotWorkHeight() {
|
|
119
|
-
var _a
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
var _a;
|
|
120
|
+
// Only a toolbar that actually lives inside the editor container takes
|
|
121
|
+
// space away from the workplace. When the `toolbar` option points to an
|
|
122
|
+
// external element, the toolbar is rendered outside the container, so it
|
|
123
|
+
// must not be subtracted — otherwise the workplace is wrongly shrunk by
|
|
124
|
+
// the toolbar's height. See https://github.com/xdan/jodit/discussions/920
|
|
125
|
+
const toolbar = this.j.toolbarContainer;
|
|
126
|
+
const toolbarHeight = toolbar && this.j.container.contains(toolbar)
|
|
127
|
+
? toolbar.offsetHeight
|
|
128
|
+
: 0;
|
|
129
|
+
return toolbarHeight + (((_a = this.j.statusbar) === null || _a === void 0 ? void 0 : _a.getHeight()) || 0) + 2;
|
|
123
130
|
}
|
|
124
131
|
/**
|
|
125
132
|
* Calculate workspace height
|