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


i want prevent xss attacks in web application. found html encoding output can prevent xss attacks. problem how html encode every single output in application? there way automate this?

i appreciate answers jsp, asp.net , php.

you don't want encode html, want html-encode user input you're outputting.

for php: htmlentities , htmlspecialchars


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -