mirror of
https://github.com/searxng/searxng.git
synced 2026-09-15 02:36:05 +00:00
[fix] engines: flaticon encode non ascii words
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
.. _Flaticon: https://www.flaticon.com
|
.. _Flaticon: https://www.flaticon.com
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from urllib.parse import urlencode
|
from urllib.parse import quote, urlencode
|
||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
@@ -36,8 +36,7 @@ def request(query: str, params: "OnlineParams") -> None:
|
|||||||
}
|
}
|
||||||
params["headers"].update(
|
params["headers"].update(
|
||||||
{
|
{
|
||||||
# important: query term is not URL encoded in the referer string
|
"Referer": f"{base_url}/search?word={quote(query)}",
|
||||||
"Referer": f"{base_url}/search?word={query}",
|
|
||||||
"X-Requested-With": "XMLHttpRequest",
|
"X-Requested-With": "XMLHttpRequest",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user