Fix call to sanitize_illegal_chars_for_xml.
Review Request #6678 — Created Dec. 5, 2014 and submitted
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.
| Description | From | Last Updated |
|---|---|---|
|
Actually, can we compare this to the expected result, to be sure? We have other tests at the top of … |
|
- Branch:
-
release-2.0.xrelease-2.0.9-prep
- Commit:
-
7314c99e8782f87a78c14cbc08ccce3cac4c325cb2b0c849b802e09e2c4cd7c103869ce3dd90fe18
Tool: Pyflakes Processed Files: reviewboard/reviews/markdown_utils.py reviewboard/reviews/tests.py Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/markdown_utils.py reviewboard/reviews/tests.py