MozillaZine

differences in Javascript Console vs. Extensions??

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

Post Posted March 6th, 2005, 11:22 am

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?

em_te

User avatar
 
Posts: 347
Joined: June 13th, 2004, 1:03 am

Post Posted March 7th, 2005, 12:07 am

decodeURIComponent()?

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 1 guest