Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-12132

Spring message tag should scape spanish accents properly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 4.0.6
    • Fix Version/s: None
    • Component/s: Web
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bclozel Brian Clozel
              Reporter:
              jarey José Ángel Rey Liñares
              Last updater:
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 31 weeks, 2 days ago