Вопрос

Utilizing the jsoup whitelist sanitizer to clean html prior to being serialized (json) and ajaxed.

How to allow for all data-* attributes in html without having to explicitly add each instance to the whitelist?

Это было полезно?

Решение

I don't think there is a built in function for that. What you could do though is, take your html string, search for every data attribute (a regex would be a good idea) and add them in a loop explicitly.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top