what happen if a post the following question in stackoverflow?
<script>
alert("javascript");
</script>
In other words, does stackoverflow sanitize the question text?
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.
Sign up to join this communitywhat happen if a post the following question in stackoverflow?
<script>
alert("javascript");
</script>
In other words, does stackoverflow sanitize the question text?
The question text is sanitized. Only a (very) small subset of HTML is tolerated.
<script>
tags are not included in the whitelist. Only a very specific set of attributes are allowed, and only on <img>
and <a>
tags. Use attributes anywhere else and the tag is stripped completely.