Fixes #117. Differentiates character-escaping strategies for paper titles and paper IDs:
IDs: only replace / with _, to account for legacy-form IDs.
Titles: replace non-word (i.e. [^\w]) characters with _.
Adds a regression test.
Notes
I'm not super happy with this solution, but I think it's minimally-breaking. Have to retain backwards-compatibility with a bad filename-sanitization scheme — too bad!
For more sophisticated (but more restricted) strategies, see e.g. Django's slugify.
Breaking changes
List any changes that break the API usage supported on master.
Description
Replace
/
with_
in download ID componentsFixes #117. Differentiates character-escaping strategies for paper titles and paper IDs:
/
with_
, to account for legacy-form IDs.[^\w]
) characters with_
.Adds a regression test.
Notes
I'm not super happy with this solution, but I think it's minimally-breaking. Have to retain backwards-compatibility with a bad filename-sanitization scheme — too bad!
For more sophisticated (but more restricted) strategies, see e.g. Django's
slugify
.Breaking changes
None
Relevant issues
Checklist
README.md
example usage has been updated.