使用th:placeholder的未转义文本
在当前的spring-boot / thymeleaf中,某些html视图具有这样的形式,其中存在一个具有以下内容的字段:
<input type="text" name="sobrenome" class="form-control" th:placeholder="#{account.sobrenome}"/>
的值account.sobrenome
放在文件中message.properties
:
account.sobrenome=Último nome
问题是应用不解决Ú
到Ú
。当我使用时th:utext
,我对此没有任何问题。
任何人都知道如何使用带有此标签th:placeholder的未转义文本吗?
回答:
问题是Spring Message Ú
视为单独的&
U
a
c
u
t
e
字母,而不是Ú
。
如下将消息更改为
account.sobrenome=\u00daltimo nome
和使用
th:placeholder="#{account.sobrenome}"
以上是 使用th:placeholder的未转义文本 的全部内容, 来源链接: utcz.com/qa/434507.html