Details
-
Improvement
-
Resolution: Unresolved
-
Neutral
-
None
-
None
-
None
Description
Hi,
We recently ran into an issue when loading properties files from our services module. We have a properties file that has some legacy values that contain html markup. The markup has class attributes, but the DefaultMessageBundlesLoader class uses JSOUP to scrub any markup in values based on the internal Whitelist. Example of markup value is:
fund.tools.productComparison.ytdNav = YTD <span class="pull-right">(NAV)</span>
We wanted to change the whitelisting behavior, but how this class is defined it has a few problems:
- It is a concrete class defined as singleton w/ no interface, so to override the default behavior you have to extend the concrete class
- The getMessages method is package protected, so if you do extend this class it does you no good, because your overridden method will not be used
- Since everything in the class is private, you basically have to cp/paste all the code and still extend the concrete class
What would be nice is if the class implements interface and allows you to either have the whitelist configurable from subclasses and/or allow JSOUP behavior turned off via jcr
Checklists
Acceptance criteria