-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All tags within <head> are pushed inside of <title> #144
Comments
Heya @xCJPECKOVERx, that's a really weird bug! To help me figure it out, would you be able to give a sample template & layout that can produce that kind of output? Also, what versions of the layout dialect and Thymeleaf are you using? |
Thymeleaf version: 3.0.2.RELEASE Note: I'm also using Spring and have templateResolver, templateEngine, and viewResolver setup per Thymeleaf documentation and have added the LayoutDialect to the templateEngine. master.html:
header.html:
home.html:
|
Cool cool, managed to replicate it in the linked test/commit. |
I've had a look at it and found there was something wrong with the code I had that tried to insert what Thymeleaf 3 calls "models" (eg: an opening element, everything inside it, and the matching closing element) inside elements that are closed immediately, like your The problem also appeared in the first decoration, so wasn't a multiple layouts issue. I've uploaded a |
I've tried the fix and it does work. Good stuff! |
Awesome! I've got no other bugs to fix for now, so I'll get this into a release very soon. |
When using layout:decorate all tags within get put inside of the <title> tag as plain text. This includes scripts and links.
<title> Exception Logs<script> $( document ).ready(function() { $('#errorSelect').on("change", function() { $(this).parents('form').submit(); }); }); </script> </title>Results in a <title> such as:
The text was updated successfully, but these errors were encountered: