Uh oh!
There was an error while loading. Please reload this page.
Implement CGI.escapeURIComponent and CGI.unescapeURIComponent - #26
Conversation
olleolleolle
left a comment
There was a problem hiding this comment.
(My comments were about... comments.)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
2b9e3ba to
5280728Comparecasperisfine
commented
Jun 9, 2022
Thanks @olleolleolle |
5280728 to
652fadbCompareCGI.url_encode and CGI.url_decodeCGI. escapeURIComponent and CGI.unescapeURIComponent 652fadb to
dbdf846CompareCGI. escapeURIComponent and CGI.unescapeURIComponent CGI.escapeURIComponent and CGI.unescapeURIComponent byroot
commented
Aug 3, 2022
I updated the PR to match what was accepted at the last meeting. |
ioquatix
commented
Aug 4, 2022
I'm curious what was the justification for the non-standard camel case names? To match the standards? |
nurse
commented
Aug 11, 2022
|
ioquatix
commented
Aug 12, 2022
Is it good justification? Why not add alias |
Uh oh!
There was an error while loading. Please reload this page.
dbdf846 to
926cdfdCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
926cdfd to
deb2873Compare[Feature #18822] Ruby is somewhat missing an RFC 3986 compliant escape method.
deb2873 to
c2729c7Comparebyroot
commented
Aug 16, 2022
Ref: ruby/cgi#26 This native implementation is much faster and available in `cgi 0.3.3`.
Ref: ruby/cgi#26 This native implementation is much faster and available in `cgi 0.3.3`.
Ref: ruby/cgi#26 This native implementation is much faster and available in `cgi 0.3.3`.
(ruby/erb#23) Ref: ruby/cgi#26 This native implementation is much faster and available in `cgi 0.3.3`. ruby/erb@2d90e9b010
(ruby/erb#23) Ref: ruby/cgi#26 This native implementation is much faster and available in `cgi 0.3.3`. ruby/erb@2d90e9b010
jrochkind
commented
Feb 5, 2023
Thank you, this is very helpful!
I am curious to learn more about how the escape differs from Javascript |
From MDN:
Whereas
So it's a bit more strict even. |
jrochkind
commented
Feb 5, 2023
Thank you! Any clues as to motivation? The ruby choice to escape seems right to me, I wouldn't want I guess this also just shows how many people have had such trouble getting this right and consistent over time. |
byroot
commented
Feb 5, 2023
Ruby follow a fairly recent RFC https://www.rfc-editor.org/rfc/rfc3986#section-2.3, and allow you to escape for pretty much all parts of the URL (path, query, anchor, etc). The behavior of JS |
Ref: https://bugs.ruby-lang.org/issues/18822
Ruby is somewhat missing an RFC 3986 compliant escape method.