@ckeditor/ckeditor5-engine 41.3.1 → 41.3.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-engine",
|
|
3
|
-
"version": "41.3.
|
|
3
|
+
"version": "41.3.2",
|
|
4
4
|
"description": "The editing engine of CKEditor 5 – the best browser-based rich text editor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wysiwyg",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"type": "module",
|
|
25
25
|
"main": "src/index.js",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@ckeditor/ckeditor5-utils": "41.3.
|
|
27
|
+
"@ckeditor/ckeditor5-utils": "41.3.2",
|
|
28
28
|
"lodash-es": "4.17.21"
|
|
29
29
|
},
|
|
30
30
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -82,7 +82,7 @@ export default class HtmlDataProcessor {
|
|
|
82
82
|
// Wrap data with a <body> tag so leading non-layout nodes (like <script>, <style>, HTML comment)
|
|
83
83
|
// will be preserved in the body collection.
|
|
84
84
|
// Do it only for data that is not a full HTML document.
|
|
85
|
-
if (
|
|
85
|
+
if (!/<(?:html|body|head|meta)(?:\s[^>]*)?>/i.test(data.trim().slice(0, 10000))) {
|
|
86
86
|
data = `<body>${data}</body>`;
|
|
87
87
|
}
|
|
88
88
|
const document = this.domParser.parseFromString(data, 'text/html');
|
package/src/model/schema.js
CHANGED
|
@@ -34,7 +34,7 @@ export default class Schema extends ObservableMixin() {
|
|
|
34
34
|
/**
|
|
35
35
|
* A dictionary containing attribute properties.
|
|
36
36
|
*/
|
|
37
|
-
this._attributeProperties =
|
|
37
|
+
this._attributeProperties = Object.create(null);
|
|
38
38
|
this.decorate('checkChild');
|
|
39
39
|
this.decorate('checkAttribute');
|
|
40
40
|
this.on('checkAttribute', (evt, args) => {
|
|
@@ -570,7 +570,7 @@ export default class Schema extends ObservableMixin() {
|
|
|
570
570
|
* @param attributeName A name of the attribute.
|
|
571
571
|
*/
|
|
572
572
|
getAttributeProperties(attributeName) {
|
|
573
|
-
return this._attributeProperties[attributeName] ||
|
|
573
|
+
return this._attributeProperties[attributeName] || Object.create(null);
|
|
574
574
|
}
|
|
575
575
|
/**
|
|
576
576
|
* Returns the lowest {@link module:engine/model/schema~Schema#isLimit limit element} containing the entire
|
package/src/view/styles/utils.js
CHANGED
|
@@ -214,6 +214,6 @@ export function getPositionShorthandNormalizer(shorthand) {
|
|
|
214
214
|
* ```
|
|
215
215
|
*/
|
|
216
216
|
export function getShorthandValues(string) {
|
|
217
|
-
const matches = string.matchAll(CSS_SHORTHAND_VALUE_REGEXP);
|
|
217
|
+
const matches = string.trim().slice(0, 1500).matchAll(CSS_SHORTHAND_VALUE_REGEXP);
|
|
218
218
|
return Array.from(matches).map(i => i[0]);
|
|
219
219
|
}
|