From 9106c49b49bc39fd264a96cb9f6b067558633594 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 25 Dec 2014 08:48:05 +0530 Subject: [PATCH] Metadata download: Fix metadata download not working for titles that contain a apostrophes in languages other than English. Fixes #1403677 [Search metadata fails](https://bugs.launchpad.net/calibre/+bug/1403677) --- src/calibre/ebooks/metadata/sources/base.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/calibre/ebooks/metadata/sources/base.py b/src/calibre/ebooks/metadata/sources/base.py index 50814feb04..f47adefeff 100644 --- a/src/calibre/ebooks/metadata/sources/base.py +++ b/src/calibre/ebooks/metadata/sources/base.py @@ -377,8 +377,6 @@ class Source(Plugin): (r'(\d+),(\d+)', r'\1\2'), # Remove hyphens only if they have whitespace before them (r'(\s-)', ' '), - # Remove single quotes not followed by 's' - (r"'(?!s)", ''), # Replace other special chars with a space (r'''[:,;!@$%^&*(){}.`~"\s\[\]/]''', ' '), ]] @@ -388,7 +386,7 @@ class Source(Plugin): tokens = title.split() for token in tokens: - token = token.strip() + token = token.strip().strip('"').strip("'") if token and (not strip_joiners or token.lower() not in ('a', 'and', 'the', '&')): yield token