This is a migrated thread and some comments may be shown as answers.

Template data item and embedded html

1 Answer 112 Views
Templates
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 02 Apr 2012, 08:25 PM
I'm going to be consuming a feed that has HTML embedded as part of the data.  How can I have my template (specifically for ListView) directly render the html instead of spitting out the string content?

var dataExample = [
  { name: "Example", description: "Embedded <strong>html</strong> in property" }
];

I've tried a few things mixing and matching custom templates but with no luck.  Help appreciated

1 Answer, 1 is accepted

Sort by
0
Accepted
Petyo
Telerik team
answered on 03 Apr 2012, 01:13 PM
Hello,

The #= # syntax does not escape the HTML. See this example - http://jsfiddle.net/bYKYE/6/ .

All the best,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Templates
Asked by
Ryan
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or