-
Notifications
You must be signed in to change notification settings - Fork 109
Closed
Labels
Description
When changing the template mode from HTML5 to LEGACYHTML5 I keep getting the following exception:
[nz.net.ultraq.thymeleaf.decorator.DecoratorProcessor] layout:decorator attribute must appear in the root element of your content page
In my content page, the layout:decorator attribute does appear in the root element and the page is processed correctly as long as the template mode is set to HTML5. I have tried to debug the source code and it seems that
if (!(element.getParent() instanceof Document))is always true as the parent is never the document but rather the enclosing element (in my case <body>).
The reason I need to use LEGACYHTML5 is that I need to use the th:utext attribute to include text which may contain HTML formatting, which is not necessarily XML-formed (i.e. it contains elements like <br> without a closing tag).
Is the layout dialect incompatible with the LEGACYHTML5 mode or am I missing something?