I had to make some assumptions, but here is my theory:
What you see is not IE modifying HTML. I do not know how you saw this, but it is a serialization of the IE DOM tree. Of course, IE must close the body tag (or create a body DOM element, if we need to be precise) in order to do something. A serialized DOM is not what the original HTML was, and if you want to extract the original HTML, you probably aren't using the right tool. This behavior sometimes occurs in WSIYWYG editors and when using the save page in IE. It simply returns its internal DOM tree back to the string, and there are no incomplete elements in the DOM tree, because they are nodes of the tree, not tags.
source share