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
BedrockMission!

Learn More

View all

Sign in to view all badges

/libs/cq/xssprotection/config.xml vs /libs/sling/xss/config.xml

Avatar

Avatar
Boost 3
Level 2
dan_stelmakh
Level 2

Likes

3 likes

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Boost 3
Level 2
dan_stelmakh
Level 2

Likes

3 likes

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
dan_stelmakh
Level 2

19-03-2018

We had a situation where ${properties.text @ context='html'} broke our page layout, because all empty div tags in the 'text' property were transformed into self-closing div tags:

<div class="btn"></div> -> <div class="btn" />

As the 'html' display context filters HTML to meet the AntiSamy policy rules, we decided to disable the 'useXHTML' directive​ in the AntiSamy configuration file.

It appeared that there are two locations with the same file in AEM:

  • /libs/cq/xssprotection/config.xml
  • /libs/sling/xss/config.xml

As per this discussion, the second one is used by HTL (aka Sightly). At the same time, the documentation says that the default AntiSamy configuration can be found using the first path. After some experiments we ended up overlaying /libs/cq/xssprotection/config.xml since it seems to be picked up after instance restarting.

I wonder what's the real difference between two locations for the AntiSamy configuration files?

Replies

Avatar

Avatar
Validate 1
Level 1
alexanderl34874
Level 1

Likes

3 likes

Total Posts

10 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 1
alexanderl34874
Level 1

Likes

3 likes

Total Posts

10 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
alexanderl34874
Level 1

18-06-2018

Hey,

we had some issues regarding this topic, too. Out of a DayCare ticket we got the following answer:

At the end we got it working but have still different behaviour on different environments.

Could please somebody explain the difference between the two files (as the author of the question mentioned above)

Thanks

Alex

Avatar

Avatar
Give Back
Level 1
gvaem
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Give Back
View profile

Avatar
Give Back
Level 1
gvaem
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Give Back
View profile
gvaem
Level 1

07-08-2020

I have the same problem. could someone explain the difference?