Understanding XSS Attacks
Explore how cross-site scripting attacks occur and how Angular mitigates these threats by escaping characters and purifying HTML inputs. Understand the risks of inserting raw HTML and how Angular's security features help keep your web applications safe from common vulnerabilities.
We'll cover the following...
In the previous lesson, we encountered an issue when trying to insert raw HTML into the document with interpolation. This is because Angular is attempting to prevent something called an XSS attack.
XSS is when malicious HTML is inserted into the document. This type of attack can be used to steal login credentials or sensitive data. It’s possible for the user to be redirected to a page they weren’t originally intended to be redirected to.
How to insert content
Let’s look at how we can insert content into a document. ...