@vaadin/rich-text-editor 25.2.15 → 25.2.17

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": "@vaadin/rich-text-editor",
3
- "version": "25.2.15",
3
+ "version": "25.2.17",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,22 +35,22 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/a11y-base": "~25.2.15",
39
- "@vaadin/button": "~25.2.15",
40
- "@vaadin/component-base": "~25.2.15",
41
- "@vaadin/confirm-dialog": "~25.2.15",
42
- "@vaadin/overlay": "~25.2.15",
43
- "@vaadin/text-field": "~25.2.15",
44
- "@vaadin/tooltip": "~25.2.15",
45
- "@vaadin/vaadin-themable-mixin": "~25.2.15",
38
+ "@vaadin/a11y-base": "~25.2.17",
39
+ "@vaadin/button": "~25.2.17",
40
+ "@vaadin/component-base": "~25.2.17",
41
+ "@vaadin/confirm-dialog": "~25.2.17",
42
+ "@vaadin/overlay": "~25.2.17",
43
+ "@vaadin/text-field": "~25.2.17",
44
+ "@vaadin/tooltip": "~25.2.17",
45
+ "@vaadin/vaadin-themable-mixin": "~25.2.17",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@vaadin/aura": "~25.2.15",
50
- "@vaadin/chai-plugins": "~25.2.15",
51
- "@vaadin/test-runner-commands": "~25.2.15",
49
+ "@vaadin/aura": "~25.2.17",
50
+ "@vaadin/chai-plugins": "~25.2.17",
51
+ "@vaadin/test-runner-commands": "~25.2.17",
52
52
  "@vaadin/testing-helpers": "^2.0.0",
53
- "@vaadin/vaadin-lumo-styles": "~25.2.15",
53
+ "@vaadin/vaadin-lumo-styles": "~25.2.17",
54
54
  "sinon": "^22.0.0"
55
55
  },
56
56
  "cvdlName": "vaadin-rich-text-editor",
@@ -59,5 +59,5 @@
59
59
  "web-types.json",
60
60
  "web-types.lit.json"
61
61
  ],
62
- "gitHead": "e0f3c1f28d7393af441fe3c9a790dba3e6ce3912"
62
+ "gitHead": "089949baaf209424c9bfec1f36d79c3efaa8b8d9"
63
63
  }
@@ -23,9 +23,9 @@ const QuillCodeBlockContainer = Quill.import('formats/code-block-container');
23
23
  class CodeBlockContainer extends QuillCodeBlockContainer {
24
24
  html(index, length) {
25
25
  const markup = super.html(index, length);
26
- const tempDiv = document.createElement('div');
27
- tempDiv.innerHTML = markup;
28
- const preTag = tempDiv.querySelector('pre');
26
+ const template = document.createElement('template');
27
+ template.innerHTML = markup;
28
+ const preTag = template.content.querySelector('pre');
29
29
  if (preTag) {
30
30
  preTag.setAttribute('spellcheck', 'false');
31
31
  return preTag.outerHTML;
@@ -732,16 +732,17 @@ export const RichTextEditorMixin = (superClass) =>
732
732
 
733
733
  /** @private */
734
734
  __processQuillClasses(content) {
735
- const tempDiv = document.createElement('div');
736
- tempDiv.innerHTML = content;
735
+ // Use template to parse the content inertly, without loading resources or running handlers
736
+ const template = document.createElement('template');
737
+ template.innerHTML = content;
737
738
  // Process only elements with align or indent classes
738
- const elementsToProcess = tempDiv.querySelectorAll('[class*="ql-align"], [class*="ql-indent"]');
739
+ const elementsToProcess = template.content.querySelectorAll('[class*="ql-align"], [class*="ql-indent"]');
739
740
  elementsToProcess.forEach((element) => {
740
741
  this.__processAlignClasses(element);
741
742
  this.__processIndentClasses(element);
742
743
  element.removeAttribute('class');
743
744
  });
744
- return tempDiv.innerHTML;
745
+ return template.innerHTML;
745
746
  }
746
747
 
747
748
  /** @private */