fix: Encode tenor search query

This commit is contained in:
Anthony Laibe 2021-09-20 17:17:59 +02:00
parent 9e4c12f408
commit 608197375d
1 changed files with 2 additions and 1 deletions

View File

@ -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?")