Tested. This does ONLY happen in Firefox. I believe this is due to the way Firefox interacts with the system clipboard. I have foud that this only happens when you copy INDENTED code. If you unindent the code and paste it in the form of:
<p>
text
</p>
rather than:
<p>
text
</p>
the problem goes away. I don't know how easy this is in other editors, but in Dreamweaver, you can simply select all the text, hit SHIFT+TAB a few times, and it removes all the indentation.
Hope this helps.
Max