There is a XSS Filter known issue with the RTE component affecting Adobe CQ 5.6, the XSS filter trims the target attribute of the a element.
Symptom
Inside the RTE component, the open in new window feature of the hyperlink component doesn’t work. As a result, the link is opened in the same page.
Solution
We need to declare the target attribute in the antisamy configuration file in CRXDE Light as follow:
-
- Copy /libs/cq/xssprotection/config.xml to /apps/cq/xssprotection/config.xml.
- Open /apps/cq/xssprotection/config.xml.
- In the common-attributes section, add the following target attribute declaration.
<attribute name="target"> <regexp-list> <regexp value="[a-zA-Z0-9-_\$]+"/> </regexp-list> </attribute>
-
- Find the a tag declaration by searching the term
- Add the line below in the list of attributes.
<attribute name="target" />
- Save the file.