Closed benhormann closed 3 years ago
Do examples 3, 4 and 8 help?
Also, for these kind of changes we need more testing. For example, are results for normal searches the same? Google takes tokens within quotes as occurring together and/or must present. Are those kind of side-effects creeping in?
I agree, it needs proper testing. I didn't find any reference to that method besides handling a bang.
Normal searching works fine with ?
, &
, and =
characters.
Do examples 3, 4 and 8 help?
!
, ?
and &
need escaped in most shells, but are OK in a string. In most shells ddgr '!? tom & jerry'
and ddgr \!\?\ tom\ \&\ jerry
are equivalent (though the latter won't work in PowerShell, for example). Typing the search, !? tom & jerry
, at the ddgr prompt is the easiest way to avoid shell specific escaping.
I didn't find any reference to that method
There is no documented method. Please use the same search strings with and without your change and see if the results are same. Also do it in debug mode so you can see the query string as well.
Please raise the PR when you are done with testing.
Closing this as there's no update on the PR.
cmd:
BROWSER=echo ddgr --np --show-browser-logs '!? tom & jerry'
or:BROWSER=echo ddgr --show-browser-logs
!? tom & jerry
actual:
https://duckduckgo.com/?q=!? tom & jerry
expected:
https://duckduckgo.com/?q=%21%3F+tom+%26+jerry
or, also legal:https://duckduckgo.com/?q=!%3F+tom+%26+jerry
Updating url.full() works, is this sufficient?: