search string parsing
-
It seems the search string "%s" will be automatically prefixed with a "+" sign. This causes problem to this web dict search engine: http://dict.youdao.com/w/+test, taking "test" as the keyword for example.
It actually works without any problem in address bar search, but in F2 search, the "+" sign is not converted to space at all.
Could this be fixed? Thanks.
Probably it's due to the space between the search engine nickname and the search keywords. Maybe you can extract the keywords from the first non-space character after the nickname? Any search engine makes use of the first space?
-
Thanks a lot for the reply. I will try 1.8 when it's out.
-
Actually it does for me, as usual for every search done from the quick command window.
I've associated youdao with prefix "di", typing di some keyword in quick command I get:http://dict.youdao.com/search?le=eng&q=+some keyword&keyfrom=dict2.index
If I try google search, g some keyword I get:
https://www.google.it/search?q=+some+keyword&gws_rd=cr&ei=mL-tWNPiGsz5UvGxg-AG
while if the prefixed search is typed on address bar it becomes:
http://dict.youdao.com/search?le=eng&q=some keyword&keyfrom=dict2.index
https://www.google.it/search?q=some+keyword&gws_rd=cr&ei=yL-tWL-PIYjkUavxiegGthis has been reported different times in the past.
-
@dLeon No idea, win7 32bit here
-
I was using
http://dict.youdao.com/w/%s/#keyfrom=dict2.topIt does work normally if I change to
http://dict.youdao.com/search?le=eng&q=%s&keyfrom=dict2.index
How do you find this URL?I think it it's still related to the keyword extraction. I guess currently it take everything after the prefix ("di" in iAN CooG's configuration) to %s, including the separator (white space) between the prefix and the real keywords, and then the white spaces are converted to "+", which will be treated as white space if it's after "q=", so there is no problem in the URL you suggested. But in my URL, the keyword is not after a "q=", so it's treated as a normal "+" sign and become an invalid URL.
The questions is: is it good to include the separator in %s? when one use "g test" to search "test" in Google, the real search passed to Google is " test" (note the space at the beginning).