How to show String new lines on gsp grails file?

后端 未结 3 1756
独厮守ぢ
独厮守ぢ 2021-01-28 02:51

I\'ve stored a string in the database. When I save and retrieve the string and the result I\'m getting is as following:

This is my new object

3条回答
  •  天涯浪人
    2021-01-28 03:33

    ${raw(adviceInstance.advice?.encodeAsHTML().replace("\n", "
    "))}

    This is how i solve the problem.

提交回复
热议问题