From bb6e3638297cd56d0f4f744507d59e95aa4893f8 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Sat, 5 Nov 2022 09:14:00 +0000 Subject: [PATCH] URL encode all params --- src/providers/list/flixhq/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/providers/list/flixhq/index.ts b/src/providers/list/flixhq/index.ts index 4c163322..d192b8e7 100644 --- a/src/providers/list/flixhq/index.ts +++ b/src/providers/list/flixhq/index.ts @@ -17,7 +17,7 @@ export const flixhqProvider: MWMediaProvider = { async getMediaFromPortable(media: MWPortableMedia): Promise { const searchRes = await fetch( - `${CORS_PROXY_URL}https://api.consumet.org/movies/flixhq/info?id=${media.mediaId}` + `${CORS_PROXY_URL}https://api.consumet.org/movies/flixhq/info?id=${encodeURIComponent(media.mediaId)}` ).then((d) => d.json()); return { @@ -29,7 +29,7 @@ export const flixhqProvider: MWMediaProvider = { async searchForMedia(query: MWQuery): Promise { const searchRes = await fetch( - `${CORS_PROXY_URL}https://api.consumet.org/movies/flixhq/${query.searchQuery}` + `${CORS_PROXY_URL}https://api.consumet.org/movies/flixhq/${encodeURIComponent(query.searchQuery)}` ).then((d) => d.json()); const results: MWProviderMediaResult[] = (searchRes || []).results.map((item: any) => ({ @@ -44,7 +44,7 @@ export const flixhqProvider: MWMediaProvider = { async getStream(media: MWPortableMedia): Promise { const searchRes = await fetch( - `${CORS_PROXY_URL}https://api.consumet.org/movies/flixhq/info?id=${media.mediaId}` + `${CORS_PROXY_URL}https://api.consumet.org/movies/flixhq/info?id=${encodeURIComponent(media.mediaId)}` ).then((d) => d.json()); const params = new URLSearchParams({