HTML&GRAILS - urls text is not displayed as hyperlink
问题 I have the following gsp code: <p class="common-text ">${direction?.description?.toHtml()?.decodeHTML()}</p> direction?.description is a text which the user entered in some input field. This text could includes website URLs like Visit my new site www.example.com How can I verified if some of the text contains a URL, and if so display it as hyperlink? The text above should be transformed to something like: Visit my new site <a href="www.example.com"> www.example.com </a> 回答1: You have two way