From ee808594ca3df4dbbe0eb134da37eec6ad424a38 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 2 Apr 2012 16:25:58 +0530 Subject: [PATCH] EPUB metadata: Strip pointless urn:isbn: prefix from ISBN declaration when reading metadata --- src/calibre/ebooks/metadata/opf2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/metadata/opf2.py b/src/calibre/ebooks/metadata/opf2.py index c30545e6e1..d21727f3c3 100644 --- a/src/calibre/ebooks/metadata/opf2.py +++ b/src/calibre/ebooks/metadata/opf2.py @@ -883,6 +883,8 @@ class OPF(object): # {{{ val = etree.tostring(x, with_tail=False, encoding=unicode, method='text').strip() if val and typ not in ('calibre', 'uuid'): + if typ == 'isbn' and val.lower().startswith('urn:isbn:'): + val = val[len('urn:isbn:'):] identifiers[typ] = val found_scheme = True break