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

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

for a quick fix, we could add a field "boolean escapeSingleQuotes" to 
PropertyVariableInterpolator which indicates whether #getValue should escape 
single quotes before returning the value.
however, this would make PVI aware that the strings are postprocessed in a 
certain way (MessageFormat#format).
so probably something like a EscapeStrategy in VariableInterpolator would fit 
for the more general case.
EscapeStrategy would either contain a Map<Character /*toEscape*/, 
String/*escape sequence*/> or just a "char escapeCharacter" and a list of 
charactersToEscape...

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