From c716a89544eda1cec41ca99cf6a89dfcba0cde8d Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Mon, 20 Sep 2021 18:21:30 +0200 Subject: [PATCH] fix: Encode tenor search query (#43) --- status/gif.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/status/gif.nim b/status/gif.nim index 02a5811..86a9150 100644 --- a/status/gif.nim +++ b/status/gif.nim @@ -4,6 +4,7 @@ import strformat import os import sequtils import chronicles +import uri from statusgo_backend/gif import getRecentGifs, getFavoriteGifs, setFavoriteGifs, setRecentGifs @@ -105,7 +106,7 @@ proc tenorQuery(self: GifClient, path: string): seq[GifItem] = return @[] proc search*(self: GifClient, query: string): seq[GifItem] = - return self.tenorQuery(fmt("search?q={query}")) + return self.tenorQuery(fmt("search?q={encodeUrl(query)}")) proc getTrendings*(self: GifClient): seq[GifItem] = return self.tenorQuery("trending?")