For example, say there is a website where the user input is not properly sanitized, but these filters are still active. Anything typed is inserted into between two div tags.
If the input is "
hello", it shows up in the source as "
Tags also work. If the input is "
<!--", then it would turn into
<div><!--</div>", turning much of the HTML on the page into a comment, breaking part of it.
However, script tags are filtered out. Inputting "
<script>alert('xss')</script>" will return "
Another part of the filter protects it from "
onload=" and other HTML event-based XSS attacks. If "
onload=alert('xss')" is the input, it will not show up at all in the source.
So, my question is, would this website still be vulnerable to cross-site scripting, or is it safe due to the filter it uses?