Thymeleaf extras nl2br is released

You can use nl2br:text="${sample}" attribute, which firstly escapes the HTML special characters in the input text, then inserts <br /> tags before newlines. github.com Background I wanted to show a multiple lines input with <br /> tag for the newlines. There’re several ways to realize it: using th:u…