evilpie / add-custom-search-engine

Add a custom search engine to the list of available search engines in Firefox
https://addons.mozilla.org/en-US/firefox/addon/add-custom-search-engine/
Mozilla Public License 2.0
173 stars 13 forks source link

Is it possible to replace spaces in the search query with "%20" instead of "+"? #63

Closed Xebtria closed 6 months ago

Xebtria commented 6 months ago

I am in a dilemma here. I added two custom search engines for dict.cc and deepl.com (makes it easier to translate stuff).

if I do that with dict.cc it works fine: image image image as you can see, it changes the spaces to "+", and these work with dict.cc. as a matter of fact, if I manually search multi word terms on dict.cc it does replace the spaces with + by itself.

however, deepl works a bit different - if you do a manual search with deepl it does not add "+" signs, it just leaves it as spaces: image

but if I do that custom search with deepl, it adds "+" signs as spaces: image image which, as you can see, results in the translation no longer working

If I basically manually type the unicode character for a space - %20 - in the search query image it works again: image

and if I would do the same for dict.cc: image it even works here: image

long story short: would it be possible to change the search query variable "%s" here image to replace entered spaces as "%20" instead of "+", or is this a firefox thing that would need to be changed by mozilla?

evilpie commented 6 months ago

Duplicate of #51.