2012-09-14 33 views
0

可能重複:
How to prevent XSS with HTML/PHP?如何防止在我的網站上進行XSS注射?

我知道,在很多的網站,如果你輸入:
<script>alert("xss");</script>
網站會顯示錯誤。
例:http://www.igossips.com

在搜索框中輸入上述代碼。
該網站顯示了很多的代碼。

如何防止這種情況發生在我自己的網站上?

+4

重複:http://stackoverflow.com/q/1996122/259457 – Travesty3

+0

請參閱以下問題:http://stackoverflow.com/questions/1996122/how-to-prevent-xss-with-html-php –

回答