mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #932262 (HTML meta tags not read in case of multiple spaces)
This commit is contained in:
parent
7895652c76
commit
3563c895e1
@ -19,7 +19,7 @@ def get_metadata(stream):
|
|||||||
return get_metadata_(src)
|
return get_metadata_(src)
|
||||||
|
|
||||||
def get_meta_regexp_(name):
|
def get_meta_regexp_(name):
|
||||||
return re.compile('<meta name=[\'"]' + name + '[\'"] content=[\'"](.+?)[\'"]\s*/?>', re.IGNORECASE)
|
return re.compile('<meta name=[\'"]' + name + r'[\'"]\s+content=[\'"](.+?)[\'"]\s*/?>', re.IGNORECASE)
|
||||||
|
|
||||||
def get_metadata_(src, encoding=None):
|
def get_metadata_(src, encoding=None):
|
||||||
if not isinstance(src, unicode):
|
if not isinstance(src, unicode):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user