From: Vlad S. <vl...@cr...> - 2005-04-27 01:15:13
|
From urlencode.c comments: * All ASCII control characters (00-1f and 7f) and the URI * 'delim' and 'unwise' characters are encoded. In addition, the * following URI query component reserved characters are also * encoded: * * $ & + , / : ; = ? @ so, according to this, single quote should be encoded as well. Stephen Deasey wrote: > On 4/26/05, Vlad Seryakov <vl...@cr...> wrote: > >>I noticed that NS does not encode ', but As does. >> >>NS urlencode: ns_urlencode "123'456" returns 123'456 >> >>AS urlencode: ns_urlencode "123'456" returns 123%27456 >> >>which is correct? > > > > I hope (!) the new version in naviserver is correct. There's a set of > tests in tests/ns_urlencode.test, and my goal was to make them > complete. I've annotated the tests with the section of the RFC I > deduced the rules from. > > Looking at it now, it seems that the single quote is not a reserved > character in a URI (RFC 2396 'unreserved'). These documents are > pretty hard going so it's entirely possible I've interpreted it wrong. > If anyone can identify some rules I've missed or got wrong, that > would be great. > > > ------------------------------------------------------- > SF.Net email is sponsored by: Tell us your software development plans! > Take this survey and enter to win a one-year sub to SourceForge.net > Plus IDC's 2005 look-ahead and a copy of this survey > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |