Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

RTE Plugin modifying HTML || Removing JS functions like onClick=""

Avatar

Level 3

RTE plugin is modifying my html content while using source edit option.

How to work around this ?

Is there any option to avoid this?

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You'd need to overlay either or both based on how you've coded-

  1. /libs/cq/xssprotection/config.xml
  2. /libs/sling/xss/config.xml

Refer Re: links to ppt not working on OOB text component  for detailed configurations. Allow those specific characters that are printed in the logs -

(

,

'

)

View solution in original post

5 Replies

Avatar

Level 10

How is your HTML being modified? Can you please provide more details. Are you using AEM 6.4 and Touch UI?

Avatar

Community Advisor

check if you can find any AntiSamy or other related errors in error.log for this component/page?

Avatar

Level 3

Yes I am getting AntiSamy in logs

**** GET / org.apache.sling.xss.impl.HtmlToHtmlContentContext AntiSamy warning: The a tag contained an attribute that we could not process. The onclick attribute had a value of "openTab(event, 'All')". This value could not be accepted for security reasons. We have chosen to remove this attribute from the tag and leave everything else in place so that we could process the input.*****

Avatar

Correct answer by
Community Advisor

You'd need to overlay either or both based on how you've coded-

  1. /libs/cq/xssprotection/config.xml
  2. /libs/sling/xss/config.xml

Refer Re: links to ppt not working on OOB text component  for detailed configurations. Allow those specific characters that are printed in the logs -

(

,

'

)

Avatar

Level 3

Thanks a ton! Reference link was very helpful.