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!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…