Remove dummy ending tags from malformed HTML