import re
from htmlentitydefs import name2codepoint
-from ..compat import unicode
+from compat import unicode, unichr
DEFAULT_CHARSET = "cp1251" # Stupid default for Russian Cyrillic
parsers = []
# parsers.append(bkmk_ph_etreetidy.parse_html)
universal_charset = "utf-8"
-entity_re = re.compile("(&\w+;)")
+entity_re = re.compile("(&\\w+;)")
num_entity_re = re.compile("(&#[0-9]+;)")