Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Escape `debouncedUrl` before send to api to support url with query

Đức An71265492aecb
diff --git a/packages/ui/src/link-preview.tsx b/packages/ui/src/link-preview.tsx
index 2737e390d8..2798f2ee59 100644
--- a/packages/ui/src/link-preview.tsx
+++ b/packages/ui/src/link-preview.tsx
@@ -23,7 +23,7 @@ export function LinkPreview({ defaultUrl }: { defaultUrl?: string }) {
title: string | null;
description: string | null;
image: string | null;
- }>(debouncedUrl && `/api/metatags?url=${debouncedUrl}`, fetcher, {
+ }>(debouncedUrl && `/api/metatags?url=${encodeURIComponent(debouncedUrl)}`, fetcher, {
revalidateOnFocus: false,
});