From 5c824e32aaadf517a130b5b3cb087738afb65bb1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 1 Apr 2018 09:18:29 +0530 Subject: [PATCH] Viewer: When doing a dictionary lookup, remove soft hyphens from the word, if any are present. Fixes #1760292 [Viewer: soft hyphens in dictionary lookup](https://bugs.launchpad.net/calibre/+bug/1760292) --- src/calibre/gui2/viewer/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/gui2/viewer/main.py b/src/calibre/gui2/viewer/main.py index b4bb9b67f9..469313d547 100644 --- a/src/calibre/gui2/viewer/main.py +++ b/src/calibre/gui2/viewer/main.py @@ -418,6 +418,7 @@ class EbookViewer(MainWindow): def lookup(self, word): from urllib import quote + word = word.replace(u'\u00ad', '') word = quote(word.encode('utf-8')) lang = canonicalize_lang(self.view.current_language) or get_lang() or 'en' try: