Encode slashes in search terms for searchengines
If a search term contains a slash, this should be encoded. While this makes no differences for search engines of the form http://example.org?q={} it does for engines like these: http://example.org/search/{} For a real world example, try: https://www.doi2bib.org/bib/{}
This commit is contained in:
parent
e07e70361e
commit
31a122e97b
@ -116,7 +116,7 @@ def _get_search_url(txt):
|
|||||||
if engine is None:
|
if engine is None:
|
||||||
engine = 'DEFAULT'
|
engine = 'DEFAULT'
|
||||||
template = config.val.url.searchengines[engine]
|
template = config.val.url.searchengines[engine]
|
||||||
url = qurl_from_user_input(template.format(urllib.parse.quote(term)))
|
url = qurl_from_user_input(template.format(urllib.parse.quote(term, safe='')))
|
||||||
|
|
||||||
if config.val.url.open_base_url and term in config.val.url.searchengines:
|
if config.val.url.open_base_url and term in config.val.url.searchengines:
|
||||||
url = qurl_from_user_input(config.val.url.searchengines[term])
|
url = qurl_from_user_input(config.val.url.searchengines[term])
|
||||||
|
Loading…
Reference in New Issue
Block a user