The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update blur-image.tsx
Steven Tey99a847baa086
diff --git a/packages/ui/src/blur-image.tsx b/packages/ui/src/blur-image.tsxindex 1e0d2ff040..92e5b2742b 100644--- a/packages/ui/src/blur-image.tsx+++ b/packages/ui/src/blur-image.tsx@@ -11,7 +11,7 @@ export function BlurImage(props: ImageProps) {setLoading(false);const target = e.target as HTMLImageElement;if (target.naturalWidth < 20 && target.naturalHeight < 20) {- setSrc(`https://avatar.vercel.sh/${props.alt}`);+ setSrc(`https://avatar.vercel.sh/${encodeURIComponent(props.alt)}`);}};@@ -23,7 +23,7 @@ export function BlurImage(props: ImageProps) {className={cn(loading ? "blur-[2px]" : "blur-0", props.className)}onLoad={handleLoad}onError={() => {- setSrc(`https://avatar.vercel.sh/${props.alt}`); // if the image fails to load, use the default avatar+ setSrc(`https://avatar.vercel.sh/${encodeURIComponent(props.alt)}`); // if the image fails to load, use the default avatar}}unoptimized/>