@orion-studios/payload-studio 0.6.0-beta.50 → 0.6.0-beta.51

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.
@@ -589,7 +589,20 @@ var normalizeDefinition = (type, value) => {
589
589
  type: value.type || type
590
590
  };
591
591
  };
592
- var decodeHtmlAttribute2 = (value) => typeof value === "string" ? value.replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">") : "";
592
+ var decodeHtmlAttribute2 = (value) => {
593
+ if (typeof value !== "string") {
594
+ return "";
595
+ }
596
+ let decoded = value;
597
+ for (let index = 0; index < 3; index += 1) {
598
+ const next = decoded.replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">");
599
+ if (next === decoded) {
600
+ break;
601
+ }
602
+ decoded = next;
603
+ }
604
+ return decoded;
605
+ };
593
606
  var attrToPropName = (name) => name.replace(/^data-orion-/, "").replace(/^data-/, "").replace(/-([a-z])/g, (_, char) => char.toUpperCase());
594
607
  var propsFromAttributes = (attributes = {}) => {
595
608
  const props = {};
@@ -465,7 +465,20 @@ var normalizeDefinition = (type, value) => {
465
465
  type: value.type || type
466
466
  };
467
467
  };
468
- var decodeHtmlAttribute2 = (value) => typeof value === "string" ? value.replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">") : "";
468
+ var decodeHtmlAttribute2 = (value) => {
469
+ if (typeof value !== "string") {
470
+ return "";
471
+ }
472
+ let decoded = value;
473
+ for (let index = 0; index < 3; index += 1) {
474
+ const next = decoded.replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">");
475
+ if (next === decoded) {
476
+ break;
477
+ }
478
+ decoded = next;
479
+ }
480
+ return decoded;
481
+ };
469
482
  var attrToPropName = (name) => name.replace(/^data-orion-/, "").replace(/^data-/, "").replace(/-([a-z])/g, (_, char) => char.toUpperCase());
470
483
  var propsFromAttributes = (attributes = {}) => {
471
484
  const props = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-studios/payload-studio",
3
- "version": "0.6.0-beta.50",
3
+ "version": "0.6.0-beta.51",
4
4
  "description": "Base CMS, builder, and custom admin toolkit for Orion Studios websites",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",