Th:inline puts html in ""

Enonic version: XP 6.0.0
OS: Win 8.1

I want the users of the page to be able to enter some HTML for some spesific products.
In ThymeLeaf it seems that th:inline is the correct way to go.

Like this:
th:inline=“text”>[[${articlehtml}]]

ArticleHtml variable contains HTML.

The result is that the HTML is wrapped in “”, which makes it not render properly.
What am I doing wrong?

Hi,

You should use this Thymeleaf tag:

data-th-utext

or

th:utext

It stands for unescaped text and will let the html “flow through” to the output.

Thanks, worked like a charm!

1 Like