fix some illegal markup (closing tags with attributes)
TAP5-2266: escape html content in @code tags instead of removing it