From dd6cd15b9a20af82809351a96af86cbce3aae870 Mon Sep 17 00:00:00 2001 From: Evan Jacobs Date: Mon, 1 Jan 2024 00:18:06 -0500 Subject: [PATCH] fix: ensure `src` prop is sanitized --- index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.tsx b/index.tsx index 046e2a2c..2323c8aa 100644 --- a/index.tsx +++ b/index.tsx @@ -662,7 +662,7 @@ function attributeValueToJSXPropValue( return styles }, {}) - } else if (key === 'href') { + } else if (key === 'href' || key === 'src') { return sanitizeUrl(value) } else if (value.match(INTERPOLATION_R)) { // return as a string and let the consumer decide what to do with it