From: Eric Kow Date: Fri, 5 Feb 2010 14:30:21 +0000 (+0000) Subject: Avoid double-escaping in 'be html'. X-Git-Tag: 1.0.0~59^2~2^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9a7fde0aec7f17617378c1a1c8c5e6db1bdfbef8;p=be.git Avoid double-escaping in 'be html'. --- diff --git a/becommands/html.py b/becommands/html.py index 908c714..da65a97 100644 --- a/becommands/html.py +++ b/becommands/html.py @@ -107,12 +107,7 @@ def complete(options, args, parser): def escape(string): if string == None: return "" - chars = [] - for char in xml.sax.saxutils.escape(string): - codepoint = ord(char) - if codepoint in htmlentitydefs.codepoint2name: - char = "&%s;" % htmlentitydefs.codepoint2name[codepoint] - chars.append(char) + chars = xml.sax.saxutils.escape(string) return "".join(chars) class BEHTMLGen():