setInnerHTML for XHTML documents

When running under XML mode, normalize the incoming HTML in setInnerHTML.
Added support to Safari as per your suggestion. Now it works in iBooks.app too! :heart: