Do the unicode check for handle_startendtag as well

See 6fc50a6