Thymeleaf 3 does not change <div/> to <div> ... </div>

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Thymeleaf 3 does not change <div/> to <div> ... </div>

Bart
I decided to try thymeleaf 3. After porting all dialects (incl. Jawr) I've encountered an issues as in the subject.

TL2 by default changes <div/> to <div> </div>, TL 3 does not.

Can someone advice me what are the options?
Reply | Threaded
Open this post in threaded view
|

Re: Thymeleaf 3 does not change <div/> to <div> ... </div>

Zemi
Administrator
Hello Bart,

precisely that was one of the goals of the new Thymeleaf 3 parser.

Many people complained that Thymeleaf pretty-printed their markup and, indeed, some JS libraries required that kind of ill-formed markup to work properly.

So Thymeleaf 3 parser respects the original markup, including quotes, blank space and so on.

Of course, you can always plug an HTML tidier on top of Thymeleaf, or as a form of one of a PostProcessor.

Regards,
  Zemi

Reply | Threaded
Open this post in threaded view
|

Re: Thymeleaf 3 does not change <div/> to <div> ... </div>

Bart
Thank you.

It also seems that TL 3 has problem with   .. . That is ok according to w3c.
It works fine without space -   ...

a bug candidate?
Reply | Threaded
Open this post in threaded view
|

Re: Thymeleaf 3 does not change <div/> to <div> ... </div>

danielfernandez
Administrator
Sorry, but it seems the forum has mangled your code. Could you re-post it inside a <raw></raw> block so that we can read it? Thanks.