Re: New functions (patch included): str_uri_escape and unescape

From: Date: Sat, 17 Mar 2001 02:11:30 +0000
Subject: Re: New functions (patch included): str_uri_escape and unescape
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-49185@lists.php.net to get a copy of this message
What's wrong with rawurl(en)(de)code() ? Gavin On Sat, 17 Mar 2001, Fredrik Ohrn wrote: > > Hello! > > I couldn't find any pointers on where to send contributions, I hope this > is the right place. > > Anyway, I was stumped when I couldn't find an easy way to escape strings > for use when printing URLs. So I added two new functions: str_uri_escape > and the coresponding str_uri_unescape to the collection of string > functions. > > Manual: > > string str_uri_escape (string str) > > Returns a string escaped according to RFC 2396 for use in URLs and URIs. > All reserved characters are encoded as %xx where xx is the hexadecimal > representation of of the coresponding octet. > > > string str_uri_unescape (string str) > > Decodes an escaped string. See str_uri_escape. > > > More info an be found at http://www.faqs.org/rfcs/rfc2396.html > > Since this is a pretty fundamental operation for webapplications I > wouldn't be suprised if similar code already exists somewhere in the PHP > source, but I didn't find anything. > > Please CC any comments directly to me, I'm not subscribed to the list due > to the huge amount of mails from the bugtracking system. > > Regards, > Fredrik > >

« previous php.dev (#49185) next »