Packages
Packages copied to clipboard
WebSearch: add a `quoting = none` setting to prevent quoting/escaping in URLs altogether
What
- Adds a
noneoption for thequotingsetting:- When this option is used, no special characters are replaced (with
%xxescape codes), and the user-provided string is used exactly as written - When any other option is used, the behaviour should be exactly as before
- When this option is used, no special characters are replaced (with
- Fixes a typo in the comments documenting the
keysearch.inifile, where thequotingsetting was referred to asargs_quoting
Why
This is kind of a niche requirement, but I have at least one example where it's useful 😄 My use case was that I wanted to use WebSearch to look up DOIs for academic references using the doi2bib website. DOIs typically contain slashes /, and doi2bib requires these to be unescaped in the URL, so
works, but the escaped version
doesn't.
After this change, I can configure this site as follows in my WebSearch config, and it behaves like I want it to:
[site/doi2bib]
url = https://doi2bib.org/bib/%s
quoting = none