Bug 60932 - Invalid or incomplete escaping of apostrophe (') in messages passed to MessageFormat
Summary: Invalid or incomplete escaping of apostrophe (') in messages passed to Messag...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.5.x-trunk
Hardware: All All
: P2 trivial (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-29 14:02 UTC by Michael Osipov
Modified: 2017-03-30 10:24 UTC (History)
0 users



Attachments
Apostrophe escaping (40.60 KB, patch)
2017-03-29 14:02 UTC, Michael Osipov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2017-03-29 14:02:08 UTC
Created attachment 34885 [details]
Apostrophe escaping

Based on: https://github.com/apache/tomcat85/pull/7#discussion_r108534666

Several messages passed to MessageFormat include apostrophes which are interpreted by MF, unfortunately they are not escaped which means -- according to Javadoc -- the content between is printed literally. Two single quotes escape to one single quote after interpolation.

See attached patched for updated properties files. Changes apply only to messages which contain format elements. Please review and say whether updated strings are now as intended. 

Patch done of Tomcat 8.5 trunk.
Comment 1 Mark Thomas 2017-03-29 21:35:04 UTC
Thanks for the patch. I've applied it to 9.0.x along with a bunch of similar issues I found. I will back-port it but probably tomorrow.
Comment 2 Mark Thomas 2017-03-30 10:24:55 UTC
Fixed in:
- trunk for 9.0.0.M20 onwards
- 8.5.x for 8.5.14 onwards
- 8.0.x for 8.0.44 onwards
- 7.0.x for 7.0.78 onwards