PDA

View Full Version : itmTpl Css "<" character



anilsert
6 Aug 2012, 10:47 PM
In itemTpl if "NEWS" has a "<" character and some text after it. Css creates a new class and puts all items after that into same class. Above the massage with "2012-07-25 12:12:30" time has "<cas<cas" as NEWS data.37758

var mesajAyrinti = new Ext.List (
{
id : 'mesajAyrinti',
fullscreen : false,
border : 0,
itemTpl : "<div class='messege{DIRECTION}'><div class='messegeText'>'{NEWS}'</div><div class='messegeFooter'>Tarih: '{G_TIME}'</div></div>",
store : mesajAyrintiStore,
plugins : [
{
ptype : 'listpaging',
loadMoreText : 'daha eski',
autoPaging : false
}],
listeners :
{
itemtap : function (item, index, e, b)
{
var listnode = e.firstChild.firstChild;
if (item.getStore().getAt(index).data.DIRECTION == 'UNREAD')
{
Ext.Ajax.request(
{
url : 'application.php?way=mesaj&case=okunduYap',
params :
{
mesajId : item.getStore().getAt(index).data.HABER_ID,
},
success : function (response, opts)
{
var result = Ext.decode(response.responseText);
if (result.success)
{
listnode.setAttribute("class", "messegeIN");
}
}


});
}
}


}
});

mitchellsimoens
8 Aug 2012, 11:19 AM
So the '<' is in the data you are trying to show? You should encode it in order to show it.