-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
José Ángel Rey Liñares opened SPR-12132 and commented
The spring message tag is not scaping html properly when spanish accent is present and htmlEscape attribute is set to true.
Example:
Text code (in property file):
label.unsubscribe=Cancelar subscripci\u00f3n
JSP javascript asignation:
$labelUnsubscribe = '<spring:message code="label.unsubscribe" htmlEscape="true" />';
Expected output:
Cancelar subscripción
Obtained output:
Cancelar subscripci& oacute;n --> note the &Xcute not scaped.
'EncodingFilter' is set to UTF-8.
When the htmlEscape attribute is set to false or the property is not specified, the message is shown correctly, but we think that the output should be scaped correctly when the property is set to true, according with the documentation.
URL of the same issue reported by another user on stackoverflow is provided. In our case the issues occurs when the property is set to htmlEscape="true" in a explicit way.
Affects: 4.0.6
Reference URL: http://stackoverflow.com/questions/17575723/spring-message-in-javascript-cannot-display-spanish-accent-characters-properly
Attachments:
- ObtainedOutputhtmlScape=false.png (2.30 kB)
- ObtainedOutputhtmlScape=true.png (3.81 kB)
Issue Links:
- Allow for using the response encoding when escaping HTML characters [SPR-12350] #16955 Allow for using the response encoding when escaping HTML characters ("duplicates")
Referenced from: commits a0c2104
0 votes, 5 watchers