Issues with innerHTML in IE

When you user element.innerHTML to grab a document segment it appears that IE mangles the attributes in the grabbed HTML. Unfortunately this garbled HTML is not valid XML (due to the missing quotes around attributes) and so the Flash Player barfs when you try and load it into an XML object.

You can see other differences between the browsers below but the only one which is totally breaking my app is the quotes around attributes.

Actual code
<a href="link.html" rel="overview" class="active">Overview</a>
Output from IE 6
<A class=active href="link.html" rel=overview>Overview</A>
Output from Firefox 1.5
<a href="link.html" rel="overview" class="active">Overview</a>
Output from Opera 8.52
<A href="http://absolute.path.to/link.html" rel="overview" class="active">Overview</A>

See what it does in your browser:

Test me