views:

239

answers:

2

I using jTemplate for showing rss item in my page. but description of each item not render right.

My Template is:

<table>
  <thead>
    <tr>
      <th>Date</th>
      <th>Title</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    {#foreach $T.Items as post}
    <tr>
      <td>{$T.post.PubDate}</td>
      <td><a href="{$T.post.Link}">{$T.post.Title}</a></td>
      <td>{$T.post.Description}</td>
    </tr>
    {#/for}
  </tbody>
</table>

but when render page, i see tag(or encoded tag) instead of render html in description column:

&lt ;table border=0 width= valign=top cellpadding=2 cellspacing=7& gt;& lt;tr& gt;& lt;td width=80 align=center valign=top& gt;& lt;font style="font-size:85%;font-family:arial,sans-serif"& gt;....

And when html decode on server side, see:

<table border=0 width= valign=top cellpadding=2 cellspacing=7><tr><td width=80 align=center valign=top><font style="font-size:85%;font-family:arial,sans-serif">....

What's problem ????? Could you please help me.

Note: I test with MicrosoftAjaxTemplates and see same problem, but when using with string it's ok like $('.desc').append(' any html tag');

Thanks in advanced

A: 

Same issue I am facing..

Can any one help me..

Hamid did you get the solution?

Kunal Mehta
sorry, i not found any solution
Hamid
+1  A: 

jTemplates escapes HTML by default. You can change that by changing a property on the optional settings object as the third argument like so:

.setTemplate("#template", null, { filter_data: false });

Jeff Adams
thanks jeff, i will check it
Hamid
thanks a lot Jeff, that worked for me!
VinnyG