Skip to content

Conversation

@igelstorm
Copy link

@igelstorm igelstorm commented Feb 2, 2021

What

  • Adds a none option for the quoting setting:
    • When this option is used, no special characters are replaced (with %xx escape codes), and the user-provided string is used exactly as written
    • When any other option is used, the behaviour should be exactly as before
  • Fixes a typo in the comments documenting the keysearch.ini file, where the quoting setting was referred to as args_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

https://doi2bib.org/bib/10.1093/qje/qjw001

works, but the escaped version

https://doi2bib.org/bib/10.1093%2Fqje%2Fqjw001

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant