Skip to content

Commit

Permalink
fix: ensure src prop is sanitized
Browse files Browse the repository at this point in the history
  • Loading branch information
quantizor committed Jan 1, 2024
1 parent 44122eb commit 8eb74da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8eb74da

Please sign in to comment.