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

Allow for using the response encoding when escaping HTML characters [SPR-12350] #16955

Closed
spring-projects-issues opened this issue Oct 20, 2014 · 1 comment
Assignees
Labels
in: web type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 20, 2014

Brian Clozel opened SPR-12350 and commented

Once #13931 is fixed, HtmlUtils.htmlescape calls should be updated throughout the framework (e.g. JSP tags, etc) to provide the current response encoding to the method in order to handle HTML escaping properly.


Affects: 4.0.7, 4.1.1

Reference URL: http://stackoverflow.com/questions/17575723/spring-message-in-javascript-cannot-display-spanish-accent-characters-properly

Issue Links:

  • #16748 Spring message tag should scape spanish accents properly ("is duplicated by")
  • #13931 Greek characters and htmlEscape()
  • #16976 Make use of response encoding when HTML escaping the default

Referenced from: commits a0c2104

1 votes, 3 watchers

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 24, 2014

Brian Clozel commented

This is fixed as of 4.1.2

Since this can cause behavior changes in existing applications, the fix should be enabled with a servlet context param such as:

<context-param>
      <param-name>responseEncodedHtmlEscape</param-name>
      <param-value>true</param-value>
    </context-param>

This behavior will be the default in Spring Framework 4.2 with #16976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants