Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p:www-form-urldecode fails to decode "+" #216

Closed
Conal-Tuohy opened this issue Jul 25, 2015 · 0 comments
Closed

p:www-form-urldecode fails to decode "+" #216

Conal-Tuohy opened this issue Jul 25, 2015 · 0 comments

Comments

@Conal-Tuohy
Copy link
Contributor

Conal-Tuohy commented Jul 25, 2015

According to http://www.w3.org/TR/html401/interact/forms.html#form-content-type

Control names and values are escaped. Space characters are replaced by '+', and then reserved characters are escaped as described in [RFC1738], section 2.2: Non-alphanumeric characters are replaced by `%HH', a percent sign and two hexadecimal digits representing the ASCII code of the character. Line breaks are represented as "CR LF" pairs (i.e., '%0D%0A').

<p:declare-step version="1.0" name="test" xmlns:p="http://www.w3.org/ns/xproc">
    <p:output port="result"/>
    <p:www-form-urldecode value="working=hello%20world&amp;not-working=hello+world"/>
</p:declare-step>

Result:

<c:param-set xmlns:c="http://www.w3.org/ns/xproc-step">
   <c:param name="working" value="hello world"/>
   <c:param name="not-working" value="hello+world"/>
</c:param-set>

(using xmlcalabash-1.1.4-95)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants