Skip to content

Commit 8eb74da

Browse files
committedJan 1, 2024
fix: ensure src prop is sanitized
1 parent 44122eb commit 8eb74da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ function attributeValueToJSXPropValue(
662662

663663
return styles
664664
}, {})
665-
} else if (key === 'href') {
665+
} else if (key === 'href' || key === 'src') {
666666
return sanitizeUrl(value)
667667
} else if (value.match(INTERPOLATION_R)) {
668668
// return as a string and let the consumer decide what to do with it

0 commit comments

Comments
 (0)