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

Style tag onload events in XSSAPI


Community Advisor

Both cq(com.adobe.granite.xss.xssapi) and sling( xss filterHTML() methods allows the events in style tag which causes security threat. May i know how to restrict it ?


xssAPI.filterHTML("<style onload=\"alert()\">test</style>") - Instead of removing the onload events, it's allowing the alert.


Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies