1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-09 19:15:46 +01:00

Moved replace_entities to utils.entities.

This commit is contained in:
2021-01-03 19:35:03 +01:00
parent 877ea68d42
commit dc4352fd4c
6 changed files with 14 additions and 20 deletions

View File

@@ -29,11 +29,6 @@ class CurrentDir(object):
_ent_pat = re.compile(r'&(\S+?);')
def replace_entities(raw, encoding='cp1252'):
return _ent_pat.sub(partial(entities.entity_to_unicode, encoding=encoding),
raw)
def xml_replace_entities(raw, encoding='cp1252'):
return _ent_pat.sub(partial(entities.xml_entity_to_unicode,
encoding=encoding), raw)