[ 
https://issues.apache.org/jira/browse/WICKET-1319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576669#action_12576669
 ] 

Gerolf Seitz commented on WICKET-1319:
--------------------------------------

found a problem with the interaction of PropertyVariableInterpolator and 
StringResourceModel:
PVI always escapes single quotes (for use with MessageFormat), whereas SRM only 
uses MessageFormat if the "Object[] parameters" parameter is not null.

Always using MessageFormat (even when there's no {0}, ... parameter in the 
resource string) would mean, that users would need to properly escape *every* 
single quote in every string. don't think that's a good move.

don't know if making PVI aware that there might be other kind of variables 
({0}...) and only let it escape the result string if such a parameter is 
present, is the right solution.

any thoughts?

> StringResourceModel incorrectly escapes ' characters in choice formats
> ----------------------------------------------------------------------
>
>                 Key: WICKET-1319
>                 URL: https://issues.apache.org/jira/browse/WICKET-1319
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-final
>            Reporter: Meetesh Karia
>            Assignee: Gerolf Seitz
>
> Here is a sample format that breaks when migrating from 1.2.6 to 1.3.  We've 
> currently worked around it by locating the string and using MessageFormat 
> ourselves:
> foo.label={0,choice,-1#n/a|-1<'{1}{0,number,#,##0.00}'}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to