fix entsToTxt()

This commit is contained in:
Damien Elmes 2016-05-15 15:43:46 +10:00
parent f6f9b767c0
commit 63499fb7e9

View file

@ -7,7 +7,7 @@ import os
import random
import time
import math
import html.entities
from html.entities import name2codepoint
import subprocess
import tempfile
import shutil
@ -171,7 +171,7 @@ def entsToTxt(html):
else:
# named entity
try:
text = chr(html.entities.name2codepoint[text[1:-1]])
text = chr(name2codepoint[text[1:-1]])
except KeyError:
pass
return text # leave as is