Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

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

Avatar

Level 2

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 .

1 Accepted Solution

Avatar

Correct answer by
Level 7

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

View solution in original post

4 Replies

Avatar

Correct answer by
Level 7

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

Avatar

Level 2

Thanks a Lot Justin , It worked ....

Avatar

Level 2

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