diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-12 09:05:05 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-12 09:05:05 -0400 |
commit | e757fd3eb3a600a919b9d1542bc68c3a4e9ae939 (patch) | |
tree | 8afda82664368ee26556bf686b95931f89f7f2d7 /becommands | |
parent | 51dee303dd3673dc702d54107c272f4180f43fb7 (diff) | |
download | bugseverywhere-e757fd3eb3a600a919b9d1542bc68c3a4e9ae939.tar.gz |
Not escaping whitespace (e.g. endlines) outside the XML document root.
ElementTree.XML was choking on them. I should unescape all whitespace
(e.g. tabs, etc.), but I'm lazy and don't have any XML that's strange
enough to need it ;).
Diffstat (limited to 'becommands')
-rw-r--r-- | becommands/comment.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/becommands/comment.py b/becommands/comment.py index c4b074f..9a1e2ec 100644 --- a/becommands/comment.py +++ b/becommands/comment.py @@ -117,7 +117,7 @@ def execute(args, test=False): new.content_type = options.content_type else: # import XML comment [list] # read in the comments - str_body = body.strip().encode("unicode_escape") + str_body = body.encode("unicode_escape").replace(r'\n', '\n') comment_list = ElementTree.XML(str_body) if comment_list.tag not in ["bug", "comment-list"]: raise comment.InvalidXML( |