Allow attributes "data-*" or "aria-*"

62 views
Skip to first unread message

jakalte...@gmail.com

unread,
Nov 14, 2014, 5:11:30 AM11/14/14
to owasp-java-html-...@googlegroups.com
Is there a possibility to allow attributes with a wildcard,
so that all attributes starting with "aria-" or "data-" are allowed?

Thanks in advance!

san...@backbase.com

unread,
Aug 18, 2016, 11:06:41 AM8/18/16
to OWASP Java HTML Sanitizer Support, jakalte...@gmail.com
Hi, 
I am also looking out for a similar solution where I need to allow attributes with the wildcard like aria-*.  
As .allowAttributes("...").matching(...);
uses values of attributes to match.
If you already have some reference then it will really help. 
Thanks in advance!

Mike Samuel

unread,
Aug 18, 2016, 11:17:43 AM8/18/16
to OWASP Java HTML Sanitizer Support
You can find a list of aria attributes at
https://www.w3.org/TR/wai-aria/states_and_properties

If you don't know how data- attributes are being used, then you should
not white list them.

data- attributes from which URL attributes can still be passed
javascript: URLs which might allow arbitrary JS execution.
> --
> You received this message because you are subscribed to the Google Groups
> "OWASP Java HTML Sanitizer Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to owasp-java-html-saniti...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages