Both issues appear to be caused by users with longer display names. The long display names can cause the invalid HTML, because the closing tags get pushed outside of the 150 characters.
I'd recommend capping the length of the display name before adding it to the content.