Target="blank" getting removed due to escapeXml="true" | Community
Skip to main content
varung44569684
Level 2
October 16, 2015
Solved

Target="blank" getting removed due to escapeXml="true"

  • October 16, 2015
  • 4 replies
  • 2983 views

Hi ,

I am facing a small problem with the current text component in CQ5 ,  Whenever I am making any hyperlink with the help of text component and I select the option of "Open in New    Window " it is getting captured inside the text element properties . But the link does not open in new window , the reason being the property escapeXml="true" used in the text.jsp of text component is removing the target="_blank" from the text .

Can anyone , please help me in this .

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ojjis

One solution is to overlay the standard text component and then remove that property of the CQ text if you wanted to in your own text component.
Then you would get your target="_blank" back

Regards
/Johan

4 replies

Ojjis
OjjisAccepted solution
Level 7
October 16, 2015

One solution is to overlay the standard text component and then remove that property of the CQ text if you wanted to in your own text component.
Then you would get your target="_blank" back

Regards
/Johan

Adobe Employee
October 16, 2015

Your best bet is to configure the XSS protection to allow the target attribute. See http://helpx.adobe.com/experience-manager/kb/target-attribut-issue-tag.html

varung44569684
Level 2
October 16, 2015

Thanks a Lot Justin , It worked ....

varung44569684
Level 2
October 16, 2015

Thanks Johan for the quick reply ,  I just wanted to know is there any other way also other than creating a new text component ..and also if I remove the excapeXml="true" from that , it would not provide it's functionality which might be needed later on.

The reason for this that when we have escapeXml="true" is internally  using a TextTag tag library class which is filtering the content using xssAPI.filterHTML(text).

 

So is it possible to make some configuration change which I can do inspite of creating a completing new component