I want to escape for XSS in an HTML context, and so far I treat the <
, >
, and "
characters.
Apparently it is recommended to escape the ampersand as well, but why? (Other than for keeping the HTML valid, let's assume that this is not an issue)
So what I am asking is:
When I escape <
, >
and "
, can someone demonstrate how the ampersand can still allow an XSS attack in an HTML context?
Cheers!