Pass HTML to the ListView Template

4 posts, 1 answers
  1. Paul
    Paul avatar
    102 posts
    Member since:
    Jun 2010

    Posted 05 Nov 2012 Link to this post

    When creating a template, I included a ${someHTMLText} in my template.  The result is that the HTML is displayed as text on the screen rather than rendered by the browser.  Is this possible?
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 07 Nov 2012 Link to this post

    Hi Paul,

     You can check the templates documentation article which shows how to use raw html instead of encoded.

    All the best,
    Atanas Korchev
    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
  4. Paul
    Paul avatar
    102 posts
    Member since:
    Jun 2010

    Posted 07 Nov 2012 Link to this post

    Yes, I did that.  I tried #: someHTMLText# in conjunction with the ${someHTMLText} attempts.  It always just shows the HTML text, never rendered HTML.
  5. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 07 Nov 2012 Link to this post

    Hi Paul,

     Here is a quote from the documentation:

    There are three ways to use the hash syntax:

    1. Render literal values: #= #
    2. Render HTML-encoded values: #: #
    3. Execute arbitrary JavaScript code: # if(...){# ... #}#

    If you use #: # your output will be encoded. You need to use #= # like this:

    #= someHTMLText #

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready