diff --git a/fanficfare/epubutils.py b/fanficfare/epubutils.py index 5c2f632..5ccfb53 100644 --- a/fanficfare/epubutils.py +++ b/fanficfare/epubutils.py @@ -265,34 +265,44 @@ def reset_orig_chapters_epub(inputio,outfile): chapterorigtitle = None tag = soup.find('meta',{'name':'chapterorigtitle'}) if tag: - chapterorigtitle = tag['content'].replace('&','&').replace('"','"') + chapterorigtitle = tag['content'] # toctitle is separate for add_chapter_numbers:toconly users. chaptertoctitle = None tag = soup.find('meta',{'name':'chaptertoctitle'}) if tag: - chaptertoctitle = tag['content'].replace('&','&').replace('"','"') - elif chapterorigtitle: + chaptertoctitle = tag['content'] chaptertoctitle = chapterorigtitle chaptertitle = None tag = soup.find('meta',{'name':'chaptertitle'}) if tag: - chaptertitle = tag['content'].replace('&','&').replace('"','"') + chaptertitle = tag['content'] + chaptertitle_tag = tag - # logger.debug("chaptertitle:(%s) chapterorigtitle:(%s)"%(chaptertitle, chapterorigtitle)) + #logger.debug("chaptertitle:(%s) chapterorigtitle:(%s)"%(chaptertitle, chapterorigtitle)) if chaptertitle and chapterorigtitle and chapterorigtitle != chaptertitle: origdata = data - # print("\n%s\n%s\n"%(chapterorigtitle,chaptertitle)) - data = data.replace(u'', - u'') - data = data.replace(u'