What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 122 Stack Exchange communities.

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>
share|improve this question
1  
I don't agree it should have been migrated, this is programming related. Anyway, the answer is here: meta.stackoverflow.com/questions/1777/… –  Kobi Nov 25 '09 at 7:59
    
Being that you've been a member for two months, you should know how the site works and how to format code. Well, the hope is. –  random Nov 25 '09 at 8:00
    
But without any context or content in the question, there's no telling if they want to know how to replicate (SO) or wanted to know if that's how SO works (Meta). –  random Nov 25 '09 at 8:01
1  
Of course, the question is terrible. But it was migrated before a change to clarify that point. –  Kobi Nov 25 '09 at 8:02
add comment

migrated from stackoverflow.com Nov 25 '09 at 7:57

This question came from our site for professional and enthusiast programmers.

marked as duplicate by ChrisF, Tom Ritter Dec 6 '09 at 13:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

By removing the tags in the appropriate place. It's called "preparing your data for the appropriate context".

share|improve this answer
add comment

<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>
share|improve this answer
add comment

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.

< --> &lt;
> --> &gt;
" --> &quot;
share|improve this answer
    
But, that's not what you see on the question... –  Kobi Nov 25 '09 at 7:55
    
no problem it will be useful to him –  Xinus Nov 25 '09 at 8:07
add comment