Description
StringResourceModel does not escape single quotes from interpolated strings which causes unexpected behavior when using with message formatters.
Consider the following string:
mystring=This string contained ${property} and message formatter placeholders
new StringResourceModel("mystring", component, model, new Object[] {"some string"});
${property} = resolved'property
The following string is passed to MessageFormat: This string contained resolved'property and message formatter placeholders {0}
.
This will cause MessageFormat to not replace
{0}with the first parameter because it is waiting for another single quote to end the escaping.