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
escape vs encodeURIComponent #511
Comments
In OCaml, strings are sequences of bytes. Thus, we are using UTF-8 strings. So for instance, Forward slashes are allowed in the query component of URIs according to RFC 3986 (section 3.4). Hence, I think we are using Thanks for your remark, and sorry for not replying sooner. |
@vouillon @hhugo are you interested in pushing more restrictions upstream to do utf8 validation for string literals? |
I believe this has been answered |
The function
Url.encode_arguments
, uses the Javascriptescape
function. However, according tohttp://stackoverflow.com/questions/75980/when-are-you-supposed-to-use-escape-instead-of-encodeuri-encodeuricomponent
escape
is broken/deprecated and should be replaced withencodeURIComponent
. One example of a difference in behavior is thatescape
does not encode forward slashes.I think
Url.encode_arguments
should useencodeURIComponent
? But I'm new to this project and not sure if there was a particular reason behind the choice of usingescape
.The text was updated successfully, but these errors were encountered: