@charisol/plexo-sdk 1.4.37 → 1.4.39
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/sanitize.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./sanitizeCompiledHtml-
|
|
1
|
+
import { n as e, r as t, t as n } from "./sanitizeCompiledHtml-CNjUXlMK.js";
|
|
2
2
|
export { n as ALLOWED_ATTR, e as ALLOWED_TAGS, t as sanitizeCompiledHtml };
|
|
@@ -5021,8 +5021,20 @@ var bn, xn = o((() => {
|
|
|
5021
5021
|
};
|
|
5022
5022
|
};
|
|
5023
5023
|
};
|
|
5024
|
-
})), rr = /* @__PURE__ */ u(nr(), 1)
|
|
5025
|
-
|
|
5024
|
+
})), rr = /* @__PURE__ */ u(nr(), 1), ir = [
|
|
5025
|
+
"javascript:",
|
|
5026
|
+
"vbscript:",
|
|
5027
|
+
"data:"
|
|
5028
|
+
];
|
|
5029
|
+
function ar(e) {
|
|
5030
|
+
let t = /url\(\s*(['"]?)([^'")]*)\1\s*\)/gi, n;
|
|
5031
|
+
for (; (n = t.exec(e)) !== null;) {
|
|
5032
|
+
let e = n[2].trim().toLowerCase();
|
|
5033
|
+
if (ir.some((t) => e.startsWith(t))) return !0;
|
|
5034
|
+
}
|
|
5035
|
+
return !1;
|
|
5036
|
+
}
|
|
5037
|
+
function or(e) {
|
|
5026
5038
|
let t = e.split(";"), n = [], r = /* @__PURE__ */ new Set([
|
|
5027
5039
|
"position",
|
|
5028
5040
|
"z-index",
|
|
@@ -5040,19 +5052,15 @@ function ir(e) {
|
|
|
5040
5052
|
let i = e.slice(0, t).trim().toLowerCase(), a = e.slice(t + 1).trim();
|
|
5041
5053
|
if (r.has(i)) continue;
|
|
5042
5054
|
let o = a.toLowerCase();
|
|
5043
|
-
o.includes("javascript:") || o.includes("vbscript:") || o.includes("expression") ||
|
|
5055
|
+
o.includes("javascript:") || o.includes("vbscript:") || o.includes("expression") || ar(a) || o.includes("@import") || o.includes("-moz-binding") || o.includes("behavior") || /\\/g.test(a) || i.includes("margin") && a.includes("-") || n.push(`${i}: ${a}`);
|
|
5044
5056
|
}
|
|
5045
5057
|
return n.join("; ");
|
|
5046
5058
|
}
|
|
5047
|
-
var
|
|
5048
|
-
|
|
5049
|
-
"vbscript:",
|
|
5050
|
-
"data:"
|
|
5051
|
-
];
|
|
5052
|
-
function cr(e) {
|
|
5059
|
+
var sr = /* @__PURE__ */ "html.head.body.title.meta.style.link.div.span.p.h1.h2.h3.h4.h5.h6.a.img.button.svg.path.table.thead.tbody.tr.th.td.hr.br.ul.ol.li.section.article.main.header.footer.aside.g.circle.rect.line.polyline.polygon.ellipse.defs.lineargradient.radialgradient.stop.clippath.use.text.tspan.form.input.textarea.select.option.label.script.opt-in-embed-form".split("."), cr = /* @__PURE__ */ "href.src.alt.class.id.style.title.target.rel.width.height.align.valign.cellpadding.cellspacing.border.viewbox.fill.stroke.d.xmlns.charset.name.content.lang.action.method.type.placeholder.required.value.page-id.property.cx.cy.r.rx.ry.x1.y1.x2.y2.points.transform.stroke-width.stroke-linecap.stroke-linejoin.stroke-dasharray.opacity.stop-color.stop-opacity.offset.clip-path.gradientunits.preserveaspectratio.text-anchor.dominant-baseline.font-size.letter-spacing.data-*.tabindex.autocomplete".split(".");
|
|
5060
|
+
function lr(e) {
|
|
5053
5061
|
let t = /^\s*<!doctype\s+html\s*>/i.test(e), n = (0, rr.default)(e, {
|
|
5054
|
-
allowedTags:
|
|
5055
|
-
allowedAttributes: { "*":
|
|
5062
|
+
allowedTags: sr,
|
|
5063
|
+
allowedAttributes: { "*": cr },
|
|
5056
5064
|
allowVulnerableTags: !0,
|
|
5057
5065
|
exclusiveFilter: (e) => e.tag === "script" && (e.attribs.src !== "https://static.maildrip.io/web-components/build/web-components.esm.js" || !!e.text?.trim()),
|
|
5058
5066
|
transformTags: { "*": (e, t) => {
|
|
@@ -5069,11 +5077,11 @@ function cr(e) {
|
|
|
5069
5077
|
let t = n[e];
|
|
5070
5078
|
if (typeof t == "string") {
|
|
5071
5079
|
let r = t.trim().toLowerCase();
|
|
5072
|
-
|
|
5080
|
+
ir.some((e) => r.startsWith(e)) && delete n[e];
|
|
5073
5081
|
}
|
|
5074
5082
|
}
|
|
5075
5083
|
if (typeof n.style == "string") {
|
|
5076
|
-
let e =
|
|
5084
|
+
let e = or(n.style);
|
|
5077
5085
|
e ? n.style = e : delete n.style;
|
|
5078
5086
|
}
|
|
5079
5087
|
return {
|
|
@@ -5085,4 +5093,4 @@ function cr(e) {
|
|
|
5085
5093
|
return t ? `<!DOCTYPE html>\n${n}` : n;
|
|
5086
5094
|
}
|
|
5087
5095
|
//#endregion
|
|
5088
|
-
export { s as a, nr as i,
|
|
5096
|
+
export { s as a, nr as i, sr as n, c as o, lr as r, u as s, cr as t };
|
package/package.json
CHANGED