We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66e9c67 commit 24f05dfCopy full SHA for 24f05df
packages/render/src/elements/embed-block.ts
@@ -76,7 +76,8 @@ const purify = DOMPurify(window);
76
// Add hook to validate src attribute (only allow https://)
77
purify.addHook("uponSanitizeAttribute", (_node, data) => {
78
if (data.attrName === "src" && data.attrValue) {
79
- if (!data.attrValue.startsWith("https://")) {
+ // Case-insensitive check for https:// scheme
80
+ if (!data.attrValue.toLowerCase().startsWith("https://")) {
81
data.attrValue = "";
82
data.forceKeepAttr = false;
83
}
0 commit comments