Fix call to sanitize_illegal_chars_for_xml.

Review Request #6678 — Created Dec. 5, 2014 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
b2b0c84...

Reviewers

The newly-added sanitize_illegal_chars_for_xml method was being called after we
had encoded the unicode string into bytes, and doing the regular expression
substitution would then try to coerce those bytes back to unicode using the
ascii codec. Doing the sanitization on the unicode object, and then encoding to
bytes works correctly.

Ran unit tests. Before the fix, this failed with the same error as the reported
issue. After, it runs successfully.

    Loading...