Repository navigation
fix: use quote instead of quote_plus - #324
vladimir-mencl-eresearch wants to merge 3 commits into
Conversation
5047553 to
a608983
Compare
a608983 to
542e54f
Compare
|
Rebased on current |
542e54f to
fe7c6b3
Compare
|
@theseal rebased with signed commits |
MDQ spec explicitly asks for spaces to be encoded as %20, not + This is achieved by urllib.parse.quote - the only difference quote_plus brings is it would be encoding spaces as '+': https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote_plus While entityIDs cannot really contain spaces (not permitted in an URI), this is all just a technicality, but quote is the correct function to use.
fe7c6b3 to
00f20dc
Compare
Got copy-pasted from set_reginfo below. Here (in set_pubinfo), the element to be inserted is PublicationInfo.
f7f13ff to
b970f70
Compare
There is a difference between quote and quote_plus in default value for safe: * quote defaults to safe='/' (and so would pass '/' without encoding) * quote_plus defaults to safe='' (and so encodes '/') Invoke quote with safe='' to make sure '/' gets encoded.
b970f70 to
c7fd838
Compare
|
Hi @theseal , I thought this one would have been just a trivial fix (use I just found the two functions also differ in default value for I also through in an unrelated fix of a typo in an error message (text was copied from another function but not adjusted for the text where it was used). And I have one more change I'm considering adding: the Allowing it for EntityDescriptor would make it possible to label MDQ data with I already have a diff ready: What do you think - about this change and about what's already in the PR? Should I add this change as well? Please let me know. Cheers, |
|
I think it is a good addition. |
MDQ spec explicitly asks for spaces to be encoded as
%20, not+This is achieved by
urllib.parse.quote- the only differencequote_plusbrings is it would be encoding spaces as+:https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote_plus
While entityIDs cannot really contain spaces (not permitted in an URI), this is all just a technicality, but quote is the correct function to use.
All Submissions: