Possible Duplicate:
What HTML tags are allowed on Stack Overflow, Server Fault, and Super User?
I'm inserting the following script into my post, which is removed when shown. How did this happen?
<script>alert('hi');</script>
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 communityPossible Duplicate:
What HTML tags are allowed on Stack Overflow, Server Fault, and Super User?
I'm inserting the following script into my post, which is removed when shown. How did this happen?
<script>alert('hi');</script>
<Should be on MSO>
The post-handling code for SO uses some sort of processing on the text that removes most of the HTML, thus removing the script part. If it didn't you could do something like the following:
<script>
call_some_function_that_buffer_overflows("codethatexplodestheusersmachine");
</script>
By removing the tags in the appropriate place. It's called "preparing your data for the appropriate context".
First of all it's not inside the script tag. Even if you put it in the script tag it gets converted to corresponding HTML entities.
For example,
<script>
alert("Hello");
</script>
The above code gets converted using following lookup table.
< --> <
> --> >
" --> "