@ckeditor/ckeditor5-engine 43.1.0 → 43.1.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/dist/index.js CHANGED
@@ -21899,7 +21899,7 @@ const CONSUMABLE_TYPES = [
21899
21899
  _sourceDefinitions = {};
21900
21900
  /**
21901
21901
  * A dictionary containing attribute properties.
21902
- */ _attributeProperties = {};
21902
+ */ _attributeProperties = Object.create(null);
21903
21903
  /**
21904
21904
  * Stores additional callbacks registered for schema items, which are evaluated when {@link ~Schema#checkChild} is called.
21905
21905
  *
@@ -22487,7 +22487,7 @@ const CONSUMABLE_TYPES = [
22487
22487
  *
22488
22488
  * @param attributeName A name of the attribute.
22489
22489
  */ getAttributeProperties(attributeName) {
22490
- return this._attributeProperties[attributeName] || {};
22490
+ return this._attributeProperties[attributeName] || Object.create(null);
22491
22491
  }
22492
22492
  /**
22493
22493
  * Returns the lowest {@link module:engine/model/schema~Schema#isLimit limit element} containing the entire
@@ -23886,7 +23886,7 @@ function removeDisallowedAttributeFromNode(schema, node, writer) {
23886
23886
  // Wrap data with a <body> tag so leading non-layout nodes (like <script>, <style>, HTML comment)
23887
23887
  // will be preserved in the body collection.
23888
23888
  // Do it only for data that is not a full HTML document.
23889
- if (!data.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)) {
23889
+ if (!/<(?:html|body|head|meta)(?:\s[^>]*)?>/i.test(data.trim().slice(0, 10_000))) {
23890
23890
  data = `<body>${data}</body>`;
23891
23891
  }
23892
23892
  const document = this.domParser.parseFromString(data, 'text/html');
@@ -35839,7 +35839,7 @@ const urlRegExp = /^url\(/;
35839
35839
  * // will return [ 'red', 'blue', 'RGB(0, 0, 0)' ]
35840
35840
  * ```
35841
35841
  */ function getShorthandValues(string) {
35842
- const matches = string.matchAll(CSS_SHORTHAND_VALUE_REGEXP);
35842
+ const matches = string.trim().slice(0, 1500).matchAll(CSS_SHORTHAND_VALUE_REGEXP);
35843
35843
  return Array.from(matches).map((i)=>i[0]);
35844
35844
  }
35845
35845