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

need without '+' every space in %s string. #10

Closed ghost closed 5 years ago

ghost commented 5 years ago

I want it to translation like google translation.

please insert option without auto insert '+'

evilpie commented 5 years ago

Can you please rephrase your question? I have a hard time understanding you.

So I think what you are saying is that when you search for something, a space character is encoded as +? This is actually done by the browser and is "normal" URL encoding.

ghost commented 5 years ago

I added like below 'Search URL' https://papago.naver.com/?sk=auto&tk=ko&st=%s

I expect below URL when I searching. https://papago.naver.com/?sk=auto&tk=ko&st=Because%20both%20of%20them%20refer%20to%20the%20same%20closure%2C%20they%20both%20increment%20and%20return%20the%20same%20running%20total.

But it actually does this. https://papago.naver.com/?sk=auto&tk=ko&st=Because%2Bboth%2Bof%2Bthem%2Brefer%2Bto%2Bthe%2Bsame%2Bclosure%2C%2Bthey%2Bboth%2Bincrement%2Band%2Breturn%2Bthe%2Bsame%2Brunning%2Btotal.

evilpie commented 5 years ago

I am afraid there is nothing I can do. The browser decides how to encode this information and I am not aware of any parameter we could use to change it.

dimaqq commented 5 years ago

My understanding of the OP is that custom-search-engine changes spaces to plus signs, i.e. changes %20 to %2B which changes text semantics in naver translate tool. Below are the screenshots to highlight the difference:

Screenshot 2019-05-09 at 11 30 27 Screenshot 2019-05-09 at 11 30 41
evilpie commented 5 years ago

My extension doesn't change %20 to %2B. Firefox replaces {searchTerms} with the entered search query and it also decides how to encode spaces.