PDA

View Full Version : DataView, XTemplate & CDATA



defcon1
23 Mar 2010, 8:04 AM
Hi,

I am using a DataView and a XTemplate to have a custom grid.
I want to wrap a special entry into CDATA to avoid html-code.

Now I have the problem that this section isnīt rendered into
my custom grid, itīs missing completely.

My XTemplate looks like this:



var resultTpl = new Ext.XTemplate('<tpl for=".">'+
'<div class="entries">'+
'<table cellspacing="0" cellpadding="0"><tr>'+
//'<table width="100%" border="0"><tr>'+
'<td class="pic"><img src="ResourceServlet?action=img&imgid=1" /></td>'+
'<td class="text"><b><![CDATA[{Title}]]></b><br/><![CDATA[{Message}]]></td>'+
//'<td class="ifinder_index-hidden" index_id="{id}">{id}</td>'+
'</tr></table></div>'+
'</tpl>', {compiled:true} );
Could anyone please help me ....? :">

Many thanks!
d1

defcon1
23 Mar 2010, 8:35 AM
It seems that HTML-parses canīt handle CDATA. Now I strip HTML-tags by using Ext.util.Format.stripTag() ... works! ;)