You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Justin Mclean (JIRA)" <ji...@apache.org> on 2013/04/20 07:29:15 UTC

[jira] [Resolved] (FLEX-27629) StringUtil.substitute fails with certain strings

     [ https://issues.apache.org/jira/browse/FLEX-27629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Mclean resolved FLEX-27629.
----------------------------------

    Resolution: Not A Problem

Substitute method uses String.replace method. Certain $ combinations have special meaning. Added comment to code explaining how to avoid this ie escape $ with $$.
                
> StringUtil.substitute fails with certain strings
> ------------------------------------------------
>
>                 Key: FLEX-27629
>                 URL: https://issues.apache.org/jira/browse/FLEX-27629
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: .Unspecified - Framework
>    Affects Versions: Adobe Flex SDK 4.5 (Release)
>         Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Browser: Internet Explorer 8.x
> Language Found: English
>            Reporter: Adobe JIRA
>
> Run the following line of code:
> trace(StringUtil.substitute("{0} goodbye", "hello$'"));
>  
>  Actual Results (in trace output):
>  
> hello goodbye goodbye
>  
>  Expected Results (in trace output):
>  
> hello$' goodbye
>  
>  Workaround (if any):
>  
> Do not use StringUtil.substitute for string substitution.
> I think SDK-18565 is the same thing, but worded rather cryptically.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira