I would like to create a html page using spring thymeleaf template. The page must contain a section <svg> . Section content is dynamically generated from java code. I tried to use the syntax [[${var}]] but it didn't work.
<svg>
[[${var}]]
Thymeleaf is quite flexible, you can use th:utext to insert svg content like this:
th:utext
<svg width="300px" height="300px" xmlns="http://www.w3.org/2000/svg" th:utext="${var}"> </svg>