On Tue, 2002-03-26 at 18:40, Stas Bekman wrote:
Do you like the URLs look like this? I think URI::Escape is broken, since I don't think it should escape http://. What do you think?
I've always thought that the default escaping of URI::Escape was broken, but that's because I've had to deal with passing data back and forth between js and mod_perl. If anything, I think that URI::Escape shouldn't escape out the "/" character (among other things). Here's my layer of abstraction to escape things the same way js does:
sub js_uri_escape { my ($class, $url) = @_; use URI::Escape; return uri_escape(uri_unescape($url), '\x00-\x29\x2c\x3a-\x3f\x5b-\x5e\x60\x7b-\x7f'); }
Just my $.02.
Thanks Jon, but in that case HTML::Entities::encode seems to do the same work :)
I will try your escape chars set
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
