SEARCH BY

All

  • All
  • Java8
  • Spring

Escape single quotes in thymeleaf

Post a Comment

To escape sigle quote in th:text or th:utext we need to use two single quotes.


 <p th:utext="${'What''s up'}"></p>
the above one will output the following
<p>What's up</p>
in this line we have used two single quotes after the word What
jaya
I love software designing, coding, writing and teaching...

Share this article

Related Posts

Post a Comment

Place your code in <em> </em> tags to send in comments | Do not add hyper links in commnet

Close

Subscribe our newsletter for the latest articles directly into your email inbox