How do I HTML Encode all the output in a web application?

前端 未结 11 1485
暖寄归人
暖寄归人 2020-12-10 17:20

I want to prevent XSS attacks in my web application. I found that HTML Encoding the output can really prevent XSS attacks. Now the problem is that how do I HTML encode every

11条回答
  •  伪装坚强ぢ
    2020-12-10 17:51

    OWASP has a nice API to encode HTML output, either to use as HTML text (e.g. paragraph or