Home > other >  Java - in Thymeleaf template that contains the HTML string
Java - in Thymeleaf template that contains the HTML string

Time:05-17

How to display in Thymeleaf string contains HTML tags?
So this code:






//More code...

In this line of code snippets ${content. text}, it generated directly on the browser:

Test



But I want to show in the browser:
test

CodePudding user response:

For such a scenario, you can use th: utext (not escape text).
Simply change



To



I suggest to also want to understand the documentation here in order to understand the use of Thymeleaf all information.

CodePudding user response:

With q
  • Related