From 22df497cc5f26cb76e132b808a3c97ae857c547d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Feb 2013 17:03:07 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/mobi/writer8/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/mobi/writer8/main.py b/src/calibre/ebooks/mobi/writer8/main.py index 47a27dd06c..564dc5521c 100644 --- a/src/calibre/ebooks/mobi/writer8/main.py +++ b/src/calibre/ebooks/mobi/writer8/main.py @@ -241,7 +241,7 @@ class KF8Writer(object): j = 0 for tag in root.iterdescendants(etree.Element): id_ = tag.attrib.get('id', None) - if id_ is None: + if id_ is None and tag.tag == XHTML('a'): # Can happen during tweaking id_ = tag.attrib.get('name', None) if id_ is not None: