diff --git a/src/components/Buttons.tsx b/src/components/Buttons.tsx
index 8a66db5..56bed3c 100644
--- a/src/components/Buttons.tsx
+++ b/src/components/Buttons.tsx
@@ -11,9 +11,7 @@ const CustomButton: React.FC<ButtonProps> = ({ label, link }) => {
     if (link) {
       try {
         setIsLoading(true)
-        const response = await fetch(
-          `/api/validate?link=${encodeURIComponent(link)}`
-        )
+        const response = await fetch(`/api/validate?link=${encodeURI(link)}`)
         const data = (await response.json()) as { status: number }
         setStatus(data.status)
       } catch (error) {
diff --git a/src/pages/api/erettsegi.ts b/src/pages/api/erettsegi.ts
index 91964d6..999537d 100644
--- a/src/pages/api/erettsegi.ts
+++ b/src/pages/api/erettsegi.ts
@@ -14,7 +14,7 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
   const address = req.headers.host
 
   const baseUrl = `https://dload-oktatas.educatio.hu/erettsegi/feladatok_${ev}${idoszak}_${szint}/`
-  const proxiedUrl = `${protocol}://${address}/api/proxy?link=${encodeURIComponent(
+  const proxiedUrl = `${protocol}://${address}/api/proxy?link=${encodeURI(
     baseUrl
   )}`