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)

This commit is contained in:
Kovid Goyal 2018-04-01 09:18:29 +05:30
parent 2d9a45db03
commit 5c824e32aa
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -418,6 +418,7 @@ class EbookViewer(MainWindow):
def lookup(self, word): def lookup(self, word):
from urllib import quote from urllib import quote
word = word.replace(u'\u00ad', '')
word = quote(word.encode('utf-8')) word = quote(word.encode('utf-8'))
lang = canonicalize_lang(self.view.current_language) or get_lang() or 'en' lang = canonicalize_lang(self.view.current_language) or get_lang() or 'en'
try: try: