Можно создать дубликат:
What are the best practices for avoiding xss attacks in a PHP site
Examples of XSS that I can use to test my page input?Примеры/типы XSS атак в PHP
Что примеры/виды на стороне клиента XSS атак в PHP и как можно предотвратить их ?
См: [? Примеры XSS, которые я могу использовать, чтобы проверить мою страницу входа] (http://stackoverflow.com/questions/7232405/examples-of-xss-that-i-can-use- to-test-my-page-input), [Каковы наилучшие методы предотвращения атак xss на PHP-сайте] (http://stackoverflow.com/questions/71328/what-are-the-best-practices-for -avoiding-xss-attack-in-php-site), [Как действительно работает XSS-атака?] (http://stackoverflow.com/questions/3364427/how-xss-attack-really-works), http: //stackoverflow.com/search?q=xss+php ... –
https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet – Cheekysoft