I’m sure that the answer to this question is No, but I can’t seem to find a way that simply transforming < and > to < and > doesn’t completely block reflected and persistent XSS.
I’m not talking about CSRF.
If this doesn’t block XSS, can you provide an example of how to bypass this defence?
When using an untrusted string in an attribute (quoted with
") you need to escape"as".Otherwise you could easily inject javascript. For example,
<a href="{{str}}">withstrbeing, for example," onmouseover='something-evil'".