From 469b633e7e35d58d86b490dafda3988a635bfe7b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 14 Jan 2019 08:37:21 +0530 Subject: [PATCH] EPUB/MOBI Catalogs: Fix exclusion by tag not working for tags that have spaces in them --- src/calibre/library/catalogs/epub_mobi_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/library/catalogs/epub_mobi_builder.py b/src/calibre/library/catalogs/epub_mobi_builder.py index bf0e00dd66..9d114a9170 100644 --- a/src/calibre/library/catalogs/epub_mobi_builder.py +++ b/src/calibre/library/catalogs/epub_mobi_builder.py @@ -1021,7 +1021,7 @@ class CatalogBuilder(object): if self.excluded_tags: search_terms = [] for tag in self.excluded_tags: - search_terms.append("tag:=%s" % tag) + search_terms.append('tags:"=%s"' % tag) search_phrase = "not (%s)" % " or ".join(search_terms) # If a list of ids are provided, don't use search_text