Reputation: 123
I'm trying to insert a spring:message tag into a form
:... tag
, here is the code :
<spring:message code="section.Wiki.titleofthearticle" var="intitule"/>
<form:input type="text" placeholder="Introduction " title="${intitule}"
path="wikiArticleTitle" required="true"/>
and my message properties values is like this :section.Wiki.titleofthearticle=**Intitule de l'article**
but unfortunately my title attribute displayed like this : Intitule de l'article
Is there a way to displayed correctly ?
Upvotes: 1
Views: 1145
Reputation: 1424
Change :
<spring:message code="section.Wiki.titleofthearticle" var="intitule"/>
To :
<spring:message htmlEscape="false" code="section.Wiki.titleofthearticle" var="intitule"/>
Upvotes: 2
Reputation: 2614
use encoding of message once (there are predefined methods in URLEncoder)
URLEncoder.encode(String s, String esc);
first parameter is String to be translated and second one is character encoding which you want.
Upvotes: 1