mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix regression that broke html metadata
HTML Input: Fix a regression that broke processing of HTML files that contain meta tags with dc: namespaced attribute values.
This commit is contained in:
parent
4e35050879
commit
5d09bc1f79
@ -69,7 +69,15 @@ def parse_meta_tags(src):
|
||||
'<meta\s+%s\s+%s' % (cpat, npat),
|
||||
):
|
||||
for match in re.finditer(pat, src, flags=re.IGNORECASE):
|
||||
field = rmap[match.group('name').lower()]
|
||||
x = match.group('name').lower()
|
||||
try:
|
||||
field = rmap[x]
|
||||
except KeyError:
|
||||
try:
|
||||
field = rmap[x.replace(':', '.')]
|
||||
except KeyError:
|
||||
continue
|
||||
|
||||
if field not in ans:
|
||||
ans[field] = replace_entities(match.group('content'))
|
||||
if len(ans) == len(META_NAMES):
|
||||
|
Loading…
x
Reference in New Issue
Block a user