Decode html string in JQuery Mobile template

I am using jquery templates which I populate using an ajax request. However, one of the values returned is encoded HTML. How can I encode it?

I have tried using ${$.mobile.html(Body).text()} but that didn't work for me.

My code:

Domain.Discussion.ListView = Domain.Discussion.ListView || {
    DiscussionPage: (function () {
        var onGetDiscussionSuccess = function (data) {
            $("#discussionsList ul").remove();
            $("#discussionListItem").tmpl(data.DiscussionsResult).appendTo("#discussionsList", function () {

        var onGetDiscussionError = function () {
            console.log("Error occured when retrieving discussions");

            url: absolutePath + "Discussions",
            headers: { "Accept": "application/json; odata=verbose" },
            success: onGetDiscussionSuccess,
            error: onGetDiscussionError


<!-- Discussion replies -->
<script id="replies" type="text/x-jquery-tmpl">
<div class="message message-first">
    <div class="message-header">
        <div class="message-header-user">
            <h2>Role not set yet</h2>
        <div class="message-header-date">${Created}</div>
    <div class="message-content">
        <hr />
<!-- /Discussion replies -->


After searching and searching I finally found the solution here: jQuery tmpl: How do I render Html?

Using {{html Body}} in my template worked like a charm.

Need Your Help

ActiveRecord::RecordNotFound - before_action set_article

ruby-on-rails ruby activerecord

I'm attempting to create a Rails blog application and am having some issues implementing friendly urls. (Not the via the gem, I'm manually implementing them.) I am able to access the article's show...

Syntax error in compiling NLopt Fortran example code

fortran fortran90 fortran77 nlopt

I'm exercising the NLopt example from using Simply Fortran (gfortran compiler).

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.