This is a perpetrator in the cases where <embed> is replaced with <ibed>.
I'm not sure what reasons there are for this replacement within gecko, but I propse adding a whitespace check to the open versions of the tags - merging some of the regexp expressions should also be possible - to avoid trashing embed tags.

Are you a Javascript / regex guru? I'm definitely not, so I'm not exactly sure what would need to be changed. But it seems like a pretty simple change, given my limited knowledge of regex (assuming of course it is a regex!).

I think we'd need to check for a few possibilities:
+ Tag followed by whitespace
+ Tag followed by forwardslash less-than "/>"
+ Tag followed by less-than ">"

Are there any other possibilities?

This is a pretty significant problem. If you paste an EMBED tag into your code view and then edit the post, it converts the tags and ruins your lovely video!