Thymeleaf - 如何将HTML传递给div?

Art*_*hur 4 html spring thymeleaf

如何将HTML从变量传递给div?

现在我有代码:

<div class="content" th:text="${ourService.getShortText()}" />
Run Code Online (Sandbox Code Playgroud)

但它在div中不显示HTML,而是将div作为div文本转义.如何将变量值作为转义文本传递,而不是作为div的内部HTML?

Art*_*hur 10

解决方案是

<div class="content" th:utext="${ourService.getShortText()}" />
Run Code Online (Sandbox Code Playgroud)