Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Another Fix for Microsoft Edge

Compare
Choose a tag to compare
@jeffpar jeffpar released this 13 Dec 19:44
· 3669 commits to master since this release

I was hoping that Microsoft Edge would prove to be less of a headache than Internet Explorer, and as trouble-free as Safari, Firefox and Chrome usually are. Unfortunately, that's not been the case.

When Edge was first released, I had to release an update that removed the <DOCTYPE> tag from my XSL files, so that its XSLT processor wouldn't barf (some vestigial ActiveX behavior). And now a recent Edge update has caused another problem, this time involving self-closing tags.

Even though my XSL files do not contain any self-closing <div> or <select> tags, the XSLT processor in Edge now converts them into self-closing tags if they're empty. This is a problem when it comes time to render those tags, because the Edge browser doesn't like them; <div></div> works, but <div/> does not.

In the process of investigating this issue, I learned that I should have included <xsl:output method="html"/> in my XSL files. That informs the XSLT processor that the output will be used as HTML, and therefore it should avoid converting empty tags to self-closing tags. So, technically, the problem was my fault, but it sure would be nice if everyone used the same defaults.