rewrite closing tags to remove unicode whitespace