I have a td-element which can contain some HTML code, e.g. <.
This is how I call in in JavaScript:
tr.find('td.item a').text(item.name);
But the output on the web page shows the HTML code (<) instead of the actual character (<).
Any idea what I’m doing wrong?
You are telling jQuery to treat the input as text, not HTML.
If you want it to treat it as HTML, use the
html()method, not thetext()method.