Thymeleaf + Spring : How to keep line break?
Two of your options: Use th:utext – easy setup option, but harder to read and remember Create a custom processor and dialect – more involved setup, but easier, more readable future use. Option 1: You can use th:utext if you escape the text using the expression utility method #strings.escapeXml( text ) to prevent XSS injection … Read more