yeah, probably should have caught that

This commit is contained in:
Mark Pilgrim
2009-05-20 11:14:02 -04:00
parent 61a84f9b5b
commit 3281d8ee88
+2
View File
@@ -9,6 +9,8 @@ out = open(output_file, 'w', encoding="utf-8") # encoding argument! important!
for line in open(input_file).readlines():
# replace entities with Unicode characters
for e in re.findall('&(.+?);', line):
if e in ('lt', 'gt', 'amp'):
continue
n = html.entities.name2codepoint.get(e)
if not n:
if e.count('#x'):