Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
jsoup ホワイトリスト サニタイザーを利用して、シリアライズ (json) および ajax される前に html をクリーンアップします。
各インスタンスをホワイトリストに明示的に追加することなく、html のすべての data-* 属性を許可するにはどうすればよいですか?
そのための組み込み関数はないと思います。あなたができることは、あなたのhtml文字列を取り、すべてのデータ属性を検索し(正規表現が良い考えです)、明示的にループに追加することです。