Expand my Community achievements bar.

SOLVED

Touch UI Text component bug when setting 'open in a new page' option

Avatar

Level 4

Hi,

when using the out of the box Text Touch UI component and setting the option 'open in a new page' the generated html does not have the target="_blank" attribute. It seems that the Antisamy Policy rules applied by the context 'html' used by the Sightly template strips out the target attribute. Is that a bug?

Thank you!

1 Accepted Solution

Avatar

Correct answer by
Level 10

If that is happening - its a bug. When you click the 'open a new page' the generated HTML should have this attribute so a new page opens. Open a ticket please. 

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

If that is happening - its a bug. When you click the 'open a new page' the generated HTML should have this attribute so a new page opens. Open a ticket please. 

Avatar

Employee

Are you also facing this in classic ui?

Avatar

Level 4

Yes. Both Classic UI and Touch UI. I tried both "wcm/foundation/components/text" (Text - Sightly) and "foundation/components/text" (Text) components.

Avatar

Employee
This could be due to xssprotection. Ideally this should work OOB. 
The fix is you may need to overlay /libs/cq/xssprotection/config.xml and add the target to the allowed attributes list for anchor tag.
For example..the below rule will allow these four target values. 
<attribute name=“target" description=“define where to open the linked document">
<literal-list>
<literal value=“_blank"/>
<literal value=“_top"/>
<literal value=“_self"/>
<literal value=“_parent"/>
</literal-list>
</attribute>