Use fully encoded URL for history
Otherwise e.g. spaces are literal spaces instead of %20 and the history breaks.
This commit is contained in:
parent
8c9bd95123
commit
f17d4388fd
@ -154,8 +154,12 @@ class WebView(QWebView):
|
|||||||
QUrl.UrlFormattingOption(0)):
|
QUrl.UrlFormattingOption(0)):
|
||||||
# If the url of the page is different than the url of the link
|
# If the url of the page is different than the url of the link
|
||||||
# originally clicked, save them both.
|
# originally clicked, save them both.
|
||||||
history.add_url(self._orig_url.toDisplayString(), self.title())
|
url = self._orig_url.toString(QUrl.FullyEncoded |
|
||||||
history.add_url(self.cur_url.toDisplayString(), self.title())
|
QUrl.RemovePassword)
|
||||||
|
history.add_url(url, self.title())
|
||||||
|
url = self.cur_url.toString(QUrl.FullyEncoded | QUrl.RemovePassword)
|
||||||
|
|
||||||
|
history.add_url(url, self.title())
|
||||||
|
|
||||||
def _init_page(self):
|
def _init_page(self):
|
||||||
"""Initialize the QWebPage used by this view."""
|
"""Initialize the QWebPage used by this view."""
|
||||||
|
Loading…
Reference in New Issue
Block a user