Ensure that the bitcoin URL spec includes the ? or & which separate multiple bitcoinparam. Based on the examples in the rest of the spec, we assume that ? is always a reasonable separator. The & character is also allowed in non-initial positions.
Fix URL spec's handling of parameter separators. #26
pull cscott wants to merge 2 commits into bitcoin:master from cscott:patch-1 changing 1 files +4 −3-
cscott commented at 3:19 AM on March 4, 2014: none
-
54d1e9ac73
Fix URL spec's handling of parameter separators.
Ensure that the bitcoin URL spec includes the `?` or `&` which separate multiple `bitcoinparam`. Based on the examples in the rest of the spec, we assume that `?` is always a reasonable separator. The `&` character is also allowed in non-initial positions.
-
laanwj commented at 7:13 AM on March 4, 2014: member
?is only allowed in the initial position (between the address and the arguments), and&as the seperator between arguments. -
cscott commented at 2:14 PM on March 4, 2014: none
The example further down in the spec uses ? as the separator between elements; I can update the patch to fix that as well.
Modern HTML prefers using ; to & as an argument separator (no encoding issues)---should we support that as well?
-
laanwj commented at 2:21 PM on March 4, 2014: member
Oh? In that case I'm not sure. May be an error in the spec. Maybe mail the owners.
Have you tested whether any of the implementations accepts
?between arguments? -
Use standard & and ; as separators. 6d6c4e0245
-
cscott commented at 5:39 PM on March 4, 2014: none
Switched to
∧It would be nice to have an example with
∧in (for example) the label text, to demonstrate proper escaping. - laanwj cross-referenced this on Mar 7, 2014 from issue Fix BIP 21 and BIP 72 ambiguities & mistakes by swansontec
-
laanwj commented at 12:15 PM on March 13, 2014: member
I'm not sure about adding
;here as separator. Do any of the current clients allow this? Is there any reason to allow different seperators? -
cscott commented at 2:56 AM on March 14, 2014: none
The standard reason for recommending the use of
;is that HTML authors are notoriously bad at properly escaping&in URLs. That is, a proper bitcoin link in HTML should be:<a href="bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=20.3&label=Luke-Jr">Pay now</a>but almost everyone forgets to escape the
&properly. See http://stackoverflow.com/questions/3481664/semicolon-as-url-query-separator for more discussion.The drawback is that authors now have to ensure that both
∧in values are properly percent-encoded. -
laanwj commented at 3:43 AM on March 14, 2014: member
Some quick testing reveals that Qt QUrl cannot deal with
;as parameter separator. I guess in general custom code needs to be written to handle it, whereas all URI parsing libraries handle&. -
laanwj commented at 2:23 PM on April 29, 2014: member
There doesn't seem to be interest in adding ; as parameter separator. Closing this issue.
- laanwj closed this on Apr 29, 2014
- luke-jr referenced this in commit a0c4f7cfd1 on Jun 6, 2017
- luke-jr referenced this in commit 970b39a40d on Jun 6, 2017
- guggero referenced this in commit b02de55fed on Jun 23, 2022