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.

-jon
-- 
[EMAIL PROTECTED] || www.divisionbyzero.com
gpg key: www.divisionbyzero.com/pubkey.asc
think i have a virus?: www.divisionbyzero.com/pgp.html
"You are in a twisty little maze of Sendmail rules, all confusing." 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to