Template data item and embedded html

2 posts, 1 answers
  1. Ryan
    Ryan avatar
    60 posts
    Member since:
    Mar 2012

    Posted 02 Apr 2012 Link to this post

    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
  2. Answer
    Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 03 Apr 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top