Cross-site Scripting (XSS) simplified: What is it & how to prevent it?

Cross-site Scripting (or XSS for short) is a type of attack in which the attacker tries to inject or run malicious code on your website. These attacks happen when we do not validate the input entered by the user to the website either through text fields, query params, text areas, or in any other format. We can understand this with the help of an example outlining the…