Reputation: 145
I have a escaped html . I want this to be rendered as HTML components using js or jquery. Any Idea?
Html to render
"<strong>Direct Cost Savings, Oracle CRM Replacement </strong>
<ul><li>x users, y portal users</li><li>Integrations: Cisco (CTI), Cognos </li><li>Replacements: Oracle CRM (on-premise), RightNow</li><li>First of five phased deployments completed</li></ul>"
Upvotes: 3
Views: 3503
Reputation: 44444
You could do something like this:
$('#item').html($("<div/>").html(yourString).text());
Upvotes: 0
Reputation: 129792
Use .text()
to get the brackets output by first rendering the <
etc, and set that text as the html source:
var container = $('#render-target');
container.html(htmlToRender);
container.html(container.text());
Upvotes: 1