From 9a7fde0aec7f17617378c1a1c8c5e6db1bdfbef8 Mon Sep 17 00:00:00 2001 From: Eric Kow Date: Fri, 5 Feb 2010 14:30:21 +0000 Subject: Avoid double-escaping in 'be html'. --- becommands/html.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'becommands') 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(): -- cgit