@ecency/render-helper 2.5.32 → 2.5.34

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.
@@ -749,7 +749,6 @@ var isSafeNavValue = (value) => {
749
749
  const isRelative = /^(\/\/|\/[^/]?|#|\?|[a-z0-9._\-]+(\/|$))/i.test(trimmed);
750
750
  return isSafeScheme || isRelative;
751
751
  };
752
- var decodeEntities2 = (input) => input.replace(/&#(\d+);?/g, (_, dec) => String.fromCodePoint(Number(dec))).replace(/&#x([0-9a-f]+);?/gi, (_, hex) => String.fromCodePoint(parseInt(hex, 16)));
753
752
  var isProxyPSrcset = (srcset) => {
754
753
  const base = trimTrailingSlash(getProxyBase());
755
754
  const candidates = srcset.split(",").map((c) => c.trim().split(/\s+/)[0]).filter(Boolean);
@@ -763,7 +762,7 @@ function sanitizeHtml(html) {
763
762
  css: false,
764
763
  // block style attrs entirely for safety
765
764
  onTagAttr: (tag, name, value) => {
766
- const decoded = decodeEntities2(value.trim());
765
+ const decoded = decodeEntities(value.trim());
767
766
  const decodedLower = decoded.toLowerCase();
768
767
  if (name.startsWith("on")) return "";
769
768
  if (tag === "img" && name === "src" && !/^https?:\/\//.test(decodedLower)) return "";