mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-22 21:42:58 +02:00
...
This commit is contained in:
parent
dee27d1a84
commit
b8528c5305
1 changed files with 4 additions and 1 deletions
|
|
@ -1430,7 +1430,10 @@ def factory(tag, text=None, sort=None, role=None, scheme=None, name=None,
|
|||
elem = metadata.makeelement(tag, attrib=attrib)
|
||||
elem.tail = '\n'+(' '*8)
|
||||
if text:
|
||||
elem.text = text.strip()
|
||||
try:
|
||||
elem.text = text.strip()
|
||||
except ValueError:
|
||||
elem.text = clean_ascii_chars(text.strip())
|
||||
metadata.append(elem)
|
||||
|
||||
factory(DC('title'), mi.title)
|
||||
|
|
|
|||
Loading…
Reference in a new issue