Opera is turning my "&lang=" into ?=

G

Genzo

Hi all,

was wondering if anyone might have knowledge on this. am testing with
Opera 7.11.
essentially whenever i try to use the substring "&lang=" in any string
value in javascript, and try to print it out, the "&lang" gets
converted into some strange character.

i.e., just try:
alert ("heyhey&lang=blahblah");

and i'll get:
"heyhey*=blahblah" in the resulting alert.

this isn't a problem for IE and Netscape. is "&lang" a reserved word
of some kind in opera's implementation of javascript?

any help would be appreciated. thanks.

Genzo
 
L

Lasse Reichstein Nielsen

essentially whenever i try to use the substring "&lang=" in any string
value in javascript, and try to print it out, the "&lang" gets
converted into some strange character.

&lang is read as an HTML entity (improperly terminated, there should
be a semicolon after). Any instance of "ampersand word (semicolon)" is
parsed as an entity. To avoid that, you must escape the ampersand:
"&lang="
Here the entity "&" is correctly parsed as the code for an ampersand.

/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,100
Messages
2,570,635
Members
47,242
Latest member
BarrettMan

Latest Threads

Top