How to sanitize HTML code in Java to prevent XSS attacks?

前端 未结 5 1277
傲寒
傲寒 2020-12-05 00:29

I\'m looking for class/util etc. to sanitize HTML code i.e. remove dangerous tags, attributes and values to avoid XSS and similar attacks.

I get html code from rich

5条回答
  •  醉话见心
    2020-12-05 01:09

    Regarding Antisamy, you may want to check this regarding the dependencies:

    http://code.google.com/p/owaspantisamy/issues/detail?id=95&can=1&q=redyetidave

提交回复
热议问题