Avoid double-escaping in 'be html'.
authorEric Kow <eric.kow@gmail.com>
Fri, 5 Feb 2010 14:30:21 +0000 (14:30 +0000)
committerEric Kow <eric.kow@gmail.com>
Fri, 5 Feb 2010 14:30:21 +0000 (14:30 +0000)
becommands/html.py

index 908c714d0f4f6ba9a86cfc6ba3bc86ec75bd26d6..da65a97d5d303557c85f106f1df7171fa5b1f033 100644 (file)
@@ -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():