I would like to highlight a text which is returned from server like below
This is my name <em>John</em>
I debugged in the server and the above string is returned. But the text is not getting highlighted when it is rendered in the browser.
It shows up like below
"This is my name <em>John</em>"
The browser view source is shown below
This is my name <em>John</em>
Should I escape the "<" and ">" symbols ? . I am using spring mvc in this application and thymeleaf for generating html
<div th:if="${not #lists.isEmpty(results)}">
<h3>Search Results</h3>
<table class="table table-striped">
<tr>
<th>Id</th>
<th>Title</th>
</tr>
<tr th:each="result : ${results}">
<td th:text="${result.id}">Id</td>
<td th:text="${result.title}">Title</td>
</tr>
</table>
</div>