mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-02-15 21:45:52 +01:00
Moved xml_replace_entities to utils.entities.
This commit is contained in:
@@ -29,11 +29,6 @@ class CurrentDir(object):
|
||||
_ent_pat = re.compile(r'&(\S+?);')
|
||||
|
||||
|
||||
def xml_replace_entities(raw, encoding='cp1252'):
|
||||
return _ent_pat.sub(partial(entities.xml_entity_to_unicode,
|
||||
encoding=encoding), raw)
|
||||
|
||||
|
||||
def prepare_string_for_xml(raw, attribute=False):
|
||||
raw = _ent_pat.sub(entities.entity_to_unicode, raw)
|
||||
raw = raw.replace('&', '&').replace('<', '<').replace('>', '>')
|
||||
|
||||
Reference in New Issue
Block a user