Added support for empty tags in getOuterHTML

This fixes an issue where empty tags, such as "\<br /\>", were being output with a closing tag, e.g. "\<br\>\</br\>", which was being interpreted by some browsers (in particular, Chrome) as two separate elements.