mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-22 00:25:31 +02:00
Fix #2794 (Title parses incorrectly)
This commit is contained in:
parent
b2b2847a47
commit
a76c1a428f
1 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@
|
|||
lxml based OPF parser.
|
||||
'''
|
||||
|
||||
import sys, unittest, functools, os, mimetypes, uuid, glob, cStringIO
|
||||
import re, sys, unittest, functools, os, mimetypes, uuid, glob, cStringIO
|
||||
from urllib import unquote
|
||||
from urlparse import urlparse
|
||||
|
||||
|
|
@ -435,7 +435,7 @@ class OPF(object):
|
|||
spine_path = XPath('descendant::*[re:match(name(), "spine", "i")]/*[re:match(name(), "itemref", "i")]')
|
||||
guide_path = XPath('descendant::*[re:match(name(), "guide", "i")]/*[re:match(name(), "reference", "i")]')
|
||||
|
||||
title = MetadataField('title')
|
||||
title = MetadataField('title', formatter=lambda x: re.sub(r'\s+', ' ', x))
|
||||
publisher = MetadataField('publisher')
|
||||
language = MetadataField('language')
|
||||
comments = MetadataField('description')
|
||||
|
|
|
|||
Loading…
Reference in a new issue