Fix #2510 (link displayed twice in xhtml-im)

- also, fix the /xhtml command that was nesting one <body/> too many