Closed xantoz closed 6 years ago
Maybe just replacing %s - without modifying any other % in url - would be enough then?
Since conkeror did that apparently, and according to https://en.wikipedia.org/wiki/Percent-encoding I think this should be sufficient.
Do you agree?
Fix according to my previous comment: PR #76.
e.g:
define_webjump("emacswiki", "https://startpage.com/do/search?cat=web&cmd=process_search&language=english&engine0=v1all&query=%s%20site%3Aemacswiki.org&abp=-1")
If you try to use this webjump webmacs crashes with the following traceback:
This used to work at least as recently as commit ae30c34ae888a047047101836443bb2f6783e502. It also used to work the same way in conkeror, that it only treats the sequence "%s" as special and another other sequence with "%" is included verbatim.
I understand that it might be preferrable to require escaping of '%' using "%%", but I think that it should probably be an error message when trying to use it instead of crashing. Alternatively it could also error out early when the webjumps are being defined to help catch badly formatted webjump definitions early.