@useinsider/guido 3.31.0-beta.bfb7664 → 3.31.0-beta.f5f4baf

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.
@@ -1,7 +1,8 @@
1
- import { PENDING_MARKER_PATTERN as c } from "../../utils/dynamicContentPendingMarker.js";
2
- import { stripFontTags as l } from "../../utils/stripFontTags.js";
3
- import { trimHrefWhitespace as d } from "../../utils/trimHrefWhitespace.js";
4
- const y = [
1
+ import { PENDING_MARKER_PATTERN as l } from "../../utils/dynamicContentPendingMarker.js";
2
+ import { stripFontTags as d } from "../../utils/stripFontTags.js";
3
+ import { trimHrefWhitespace as m } from "../../utils/trimHrefWhitespace.js";
4
+ import { unescapeInsideTemplateTags as c } from "../../utils/unescapeInsideTemplateTags.js";
5
+ const h = [
5
6
  {
6
7
  id: "fix-url-encoding-start",
7
8
  description: "Replace {%22 with %7B%22 to fix URL encoding",
@@ -40,34 +41,30 @@ const y = [
40
41
  },
41
42
  {
42
43
  id: "unescape-inequality-operators-start",
43
- description: "Replace &lt; with < to fix URL encoding",
44
- type: "replace",
45
- search: "&lt;",
46
- replacement: "<",
47
- replaceAll: !0,
44
+ description: "Replace &lt; with < inside template tags",
45
+ type: "custom",
46
+ processor: (e) => c(e, "&lt;", "<"),
48
47
  priority: 13
49
48
  },
50
49
  {
51
50
  id: "unescape-inequality-operators-end",
52
- description: "Replace &gt; with > to fix URL encoding",
53
- type: "replace",
54
- search: "&gt;",
55
- replacement: ">",
56
- replaceAll: !0,
51
+ description: "Replace &gt; with > inside template tags",
52
+ type: "custom",
53
+ processor: (e) => c(e, "&gt;", ">"),
57
54
  priority: 14
58
55
  },
59
56
  {
60
57
  id: "strip-font-tags",
61
58
  description: 'Unwrap browser-translate-injected <font dir="auto"> tags, keeping inner content; other <font> elements are left intact.',
62
59
  type: "custom",
63
- processor: (e) => l(e),
60
+ processor: (e) => d(e),
64
61
  priority: 15
65
62
  },
66
63
  {
67
64
  id: "trim-href-whitespace",
68
65
  description: "Trim leading/trailing whitespace and &nbsp; from every href value",
69
66
  type: "custom",
70
- processor: (e) => d(e),
67
+ processor: (e) => m(e),
71
68
  priority: 16
72
69
  },
73
70
  {
@@ -188,16 +185,15 @@ const y = [
188
185
  id: "remove-dc-pending-marker",
189
186
  description: "Strip the editor-only pending dynamic-content choice marker from compiled output",
190
187
  type: "regex",
191
- pattern: c,
188
+ pattern: l,
192
189
  replacement: "",
193
190
  flags: "g",
194
191
  priority: 46
195
192
  },
196
193
  {
197
194
  id: "remove-script-tags",
198
- // SD-145051: parity with HB HtmlCleaner.removeUnsafeHtmlTags — strip <script> from
199
- // compiled email. Priority 50 runs after the &lt;/&gt; unescape rules (13/14) so
200
- // post-unescape tags are still caught. Do NOT add to AMP_SAFE_RULE_IDS (AMP needs <script>).
195
+ // Parity with HB HtmlCleaner.removeUnsafeHtmlTags; runs after the template-tag unescape rules (13/14).
196
+ // Do NOT add to AMP_SAFE_RULE_IDS (AMP needs <script>).
201
197
  description: "Strip <script>…<\/script> tags from compiled email",
202
198
  type: "regex",
203
199
  pattern: "<script[^>]*>.*?<\/script>",
@@ -218,5 +214,5 @@ const y = [
218
214
  }
219
215
  ];
220
216
  export {
221
- y as defaultHtmlCompilerRules
217
+ h as defaultHtmlCompilerRules
222
218
  };
@@ -1,4 +1,4 @@
1
- const o = "3.31.0-beta.bfb7664", s = { stripo: { version: "2.87.0" } }, t = {
1
+ const o = "3.31.0-beta.f5f4baf", s = { stripo: { version: "2.87.0" } }, t = {
2
2
  version: o,
3
3
  guido: s
4
4
  };
@@ -0,0 +1 @@
1
+ export declare function unescapeInsideTemplateTags(html: string, entity: string, character: string): string;
@@ -0,0 +1,8 @@
1
+ import { CONDITION_TAG_REGEX as c, DYNAMIC_CONTENT_TAG_REGEX as n } from "../enums/html-validator.js";
2
+ function t(a, p, r) {
3
+ const e = (T) => T.replaceAll(p, r);
4
+ return a.replace(c, e).replace(n, e);
5
+ }
6
+ export {
7
+ t as unescapeInsideTemplateTags
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.31.0-beta.bfb7664",
3
+ "version": "3.31.0-beta.f5f4baf",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",