asp.net - jTemplate and MicrosoftAjaxTemplates encode or decoded html (browser not render as html) -


i using jtemplate showing rss item in page. 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 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, 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?

note: test microsoftajaxtemplates , see same problem, when using string it's ok $('.desc').append(' html tag');

jtemplates escapes html default. can change changing property on optional settings object third argument so:

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


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -