Reputation: 311
I have HTML content from sql query.When I am showing this in UI it is displaying tags too.I want to show the text with the html properties(bold).
My text : Total Amount
This is show as Test in ui.When i checked with fire fug it is showing as "><b>Test<b>
from sql : '<b>Total Amount</b>' AS Amount
How can I solve this?
Upvotes: 0
Views: 678
Reputation: 2394
It may be caused by using jquery text() method when you are showing your result in the UI. You have to use $('#yourHtmlTag').html('<b>Total Amount</b>')
instead of $('#yourHtmlTag').text('<b>Total Amount</b>')
.
Upvotes: 2