Secure XSS filter PHP function

Xss is a well known vulnerability of websites. This can cause a great harm to website and servers. Most of the web developers do not know about this. This is the main reason why cyber crimes are on the way. Every web developers should know about these website vulnerabilities. In one of my post I wrote some website security tips for web developers  While surfing on internet I came across some code to filter PHP XSS attacks.License:
This code is public domain, you are free to do whatever you want with it, including adding it to your own project which can be under any license.Put this in a function in your webpage and pass every variable to filter xss strings. The goal of this function is to be a generic function that can be used to parse almost any input and render it XSS safe.

I also came to know about about another XSS filtering function in PHP. It can cleans various UTF encodings & nested exploits.

 

advertisement

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest updates, web design resources and tools.

You have Successfully Subscribed!

About The Author

  • ADD YOUR COMMENT

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Receive fresh web design resources and SEO tips in your email by our weekly newsletter

You have Successfully Subscribed!