E-book viewer: Fix clicking links in the footnote popup ignoring the anchor part of the link. Fixes #1786577 [Private bug](https://bugs.launchpad.net/calibre/+bug/1786577)

This commit is contained in:
Kovid Goyal 2018-08-12 08:22:50 +05:30
parent ae7a128126
commit aa4a177c04
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -854,7 +854,10 @@ class DocumentView(QWebView): # {{{
self.link_clicked(qurl)
return
path = qurl.toLocalFile()
self.link_clicked(self.as_url(path))
link = self.as_url(path)
if qurl.hasFragment():
link.setFragment(qurl.fragment(QUrl.FullyEncoded), QUrl.StrictMode)
self.link_clicked(link)
def sizeHint(self):
return self._size_hint