HTML / Grails - how to render link as plain text

I have to present the link argument as a regular string / text (so the user won't be able to click on the link)

<span class="text-light">
    ${statusMessage?.toHtml()}
    ${statusMessage?.link}
</span>

      

${statusMessage?.link}

is an argument reference which is (for example)

<a href="/threebaysover/product/show/OQ%3D%3D" class="ui-link">2 tour</a>

      

+3


source to share


1 answer


You can try this:



${statusMessage?.link?.replaceAll("<(.|\n)*?>", '')​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​}

      

+2


source







All Articles