Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring message tag should scape spanish accents properly [SPR-12132] #16748

Closed
spring-projects-issues opened this issue Aug 28, 2014 · 4 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: duplicate A duplicate of another issue

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Aug 28, 2014

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:

Issue Links:

Referenced from: commits a0c2104

0 votes, 5 watchers

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Sep 1, 2014

José Ángel Rey Liñares commented

Added a little maven project showing an example reproducing what we think the problem is: https://github.com/jarey/SpringMessageIssueExample

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Oct 22, 2014

Juergen Hoeller commented

@bclozel, could you have a look at this one please since you've been into the HTML escaping topic lately?

Juergen

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Oct 22, 2014

Brian Clozel commented

Juergen Hoeller Sure!

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Oct 22, 2014

Brian Clozel commented

Issue confirmed with a repro project.
This will be fixed by #16955.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants