如何在 Thymeleaf 中转义单引号 (') [英] How to escape single quote (') in Thymeleaf
本文介绍了如何在 Thymeleaf 中转义单引号 (')的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要这个输出
怎么了?
但是我得到一个TemplateInputException
.我曾尝试使用 HTML 实体,但同样失败.
But I get an TemplateInputException
. I have tried with HTML entity but it fails the same.
推荐答案
双单引号.像这样:
<h1 th:text="${'What''s up?'}" />
这篇关于如何在 Thymeleaf 中转义单引号 (')的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文