cleaned up the presentation of an inserted element

the spurious space at the end of an opening tag with no attributes is now gone.
also, all runs of multiple spaces are compressed down to a single space in the element body