So, I am writing learning app in react, I want simulate xss attack.
The problem is, that react automatically escapes everything for me.
Example:
var htmlString = '<img src="javascript:alert('XSS!')" />';
.
.
.
render() {
return (
<div>{htmlString}</div>
);
}
All is ok, no xss :-)
But I want enable xss, is there any way how to 'do it'?