PDA

View Full Version : Incorrect handling of html entities by combo box



atchijov
23 Feb 2010, 1:58 PM
I just run into following problem:



{
xtype: combo,
...
store: [ "<not set>", ... ]
}


will not show "<not set>" element in pop-up list (it looks like it gets interpreted as unknown HTML tag). When I changed it to





{
xtype: combo,
...
store: [ "&lt;not set&gt;", ... ]
}


It will show correct value in pop-up list, but if I select this value, combo box text field shows "&lt;not set&gt;" instead of "<not set>".

Further information:


{
xtype: combo,
...
store: [ escape("<not set>"), ... ]
}

does not work in both places (both places show "%3Cnot%20set%3E" );

Andrei

lleslie84
23 Feb 2010, 2:17 PM
it sounds like an encoding problem... you can try
Ext.util.Utf8.encode(mystring);

or better yet....
unescape(mystring)

it should decode the string and return the correct value