2
如何显示在Thymeleaf中包含HTML标签的字符串?显示在Thymeleaf模板中包含HTML的字符串
所以这段代码:
<div th:each="content : ${cmsContent}">
<div class="panel-body" sec:authorize="hasRole('ROLE_ADMIN')">
<div th:switch="${content.reference}">
<div th:case="'home.admin'">
<p th:text="${content.text}"></p>
</div>
</div>
</div>
//More code....
并且在该行的代码${content.text}
的,它确实产生该浏览器:
<p>test</p>
但是我想表明这不是在浏览器:
test
http://stackoverflow.com/questions/23156585/process-thymeleaf-variable-as-html-code-and-not-string – globalworming