Strategy Web allows HTML output in Prompt titles and descriptions. Before Strategy 11.0 release, users could insert any HTML to the prompt title and description. Starting with version 11.0 Strategy uses OWASP-Java-Html-Sanitizer to smartly encode instead of not encoding at all. This change was introduced to tighten Strategy security standards. Some elements and attributes like
<a target=“popup”>will be filtered by OWASP-Java-Html-Sanitizer due to security concerns.
Go to
<MSTR Web> \WEB-INF\xmlfolder and add v="WEB-INF/xml/htmlSanitizerConfig.json” to the
sys_defaults.xmlfile in following syntax:
<pr des="A fast and easy to configure HTML Sanitizer which lets you include HTML while protecting against XSS." n="htmlSanitizerFileLocation" scp="system" v="WEB-INF/xml/htmlSanitizerConfig.json"/>

Go to
<MSTR Web> \WEB-INF\xmland add the customized sanitizer policies to the
htmlSanitizerConfig.jsonfile
[
{
"allowElements": ["a"],
"allowAttributesObject": {
"allowAttributes": ["target", "onclick"],
"onElements": ["a"],
"globally": false
}
}
]htmlSanitizerConfig.jsonto allow them.
"allowElements": Allows the named elements.
"allowAttributesObject": Returns an object that lets you associate policies with the given attributes, and allow them globally or on specific elements.
"globally"and
"onElements": To allow the attribute for all elements, set
globally: true. Otherwise input the elements inside
"onElements":.
"allowTextIn": Allows text content in the named elements.
"allowWithoutAttributes": Assuming the given elements are allowed, allows them to appear without attributes.
Below are some examples for
htmlSanitizerConfig.jsoncontent.
“target”only in tag “a”
:
<a href='http://outside.org/' target=\"blank_\">out</a>.
“script”: <script> xxx </script>
“span”without any attributes:
<span></span>
“class”attribute on any elements globally.
Restart Web Server.