differences in Javascript Console vs. Extensions??

Talk about add-ons and extension development.
Post Reply
HolliOfPerl
Posts: 6
Joined: March 5th, 2005, 7:42 am
Location: Germany
Contact:

differences in Javascript Console vs. Extensions??

Post by HolliOfPerl »

Greetings.

I encountered a strange phenomenon. When i type this code

Code: Select all

var s = "http://search.cpan.org/search?mode=module&query=XML%3A%3AParser"; alert(decodeURI(s));

into the Firefox Javascript console it correctly alerts "http://search.cpan.org/search?mode=module&query=XML::Parser".

When I put the same code into an extension, it fails. "%3A" stays "%3a".

That drives me nuts. Is that a known bug, a feature or what? Or two different dialects?

Update:
other Entities like "%20" (space) are decoded correctly in both ways. Odd.

regards

holli
Signature?
User avatar
em_te
Posts: 361
Joined: June 13th, 2004, 1:03 am

Post by em_te »

decodeURIComponent()?
Post Reply