You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/01/02 17:55:00 UTC

[jira] [Work logged] (WW-4742) Problem with escape when the key from getText has no value

     [ https://issues.apache.org/jira/browse/WW-4742?focusedWorklogId=530231&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-530231 ]

ASF GitHub Bot logged work on WW-4742:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Jan/21 17:54
            Start Date: 02/Jan/21 17:54
    Worklog Time Spent: 10m 
      Work Description: lukaszlenart opened a new pull request #463:
URL: https://github.com/apache/struts/pull/463


   and uses proper order for escaping
   
   Fixes [WW-4742](https://issues.apache.org/jira/browse/WW-4742)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 530231)
    Remaining Estimate: 0h
            Time Spent: 10m

> Problem with escape when the key from getText has no value
> ----------------------------------------------------------
>
>                 Key: WW-4742
>                 URL: https://issues.apache.org/jira/browse/WW-4742
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Tags
>    Affects Versions: 2.5.8, 2.5.10
>            Reporter: Mateus Carvalho
>            Assignee: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.6
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When using an encoding like ISO-8859-1 and having the following situation:
> {code:title=message.ftl|borderStyle=solid}
> ...
> <@s.text name="Obrigatório - not mapped word in any dictionary" />
> ...
> {code}
> We have the following output after update 2.5.8:
> {code}
> Obrigat\u00F3rio - not mapped word in any dictionary
> {code}
> After careful look at the source code and issues from the 2.5.8 I found the problem happens just in one added line on WW-4712, the following part of the code:
> {code:title=TextProviderHelper.java|borderStyle=solid}
> ...
> public static String getText(String key, String defaultMessage, List<Object> args, ValueStack stack, boolean searchStack) {
> ...
> //This escape causes the problem
> msg = StringEscapeUtils.escapeEcmaScript(msg);
> ...
> }
> ...
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)