Announcement Announcement Module
Collapse
No announcement yet.
Damned if you do, and damned if you don't Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Damned if you do, and damned if you don't

    We want to be able to:

    1. Show japanese, german, english, and any other UTF-8 data in HTML input fields, AND
    2. Show double-quotes if users enter them as part of data entry.

    Using <spring:message text="${something}" htmlEscape="false"/> solves 1. above, but means that when a data field containing double-quotes is saved, it never displays again -- since on re-showing the form it sort of becomes part of the HTML in the page.

    Using <spring:message text="${something}" htmlEscape="true"/> (you guessed it) solves 2. above, but means that japanese, german, and any other unicode character doesn't display properly.

    Anyone solved this?

    This would seem like a general issue a lot of people might face and so wondered if the Spring team might include support for this in <spring:message> or something.

    Other than that, I'm thinking it might be easiest to leave htmlEscape="false" so that unicode characters draw properly, and somehow manually escape the double-quotes if they appear in data.

  • #2
    Indeed, this is a general issue. What about using htmlEscape="false" and a JSTL function that escapes the double-quotes.
    HTH

    Comment

    Working...
    X