From de2f26760711655ad2c6e8faddbec702b5da3874 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 2 Aug 2014 19:49:15 +0200 Subject: [PATCH] Fix restarting/exceptions with URLs with spaces. --- qutebrowser/app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 340e2d699..6666583b9 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -482,8 +482,8 @@ class Application(QApplication): return pages for tab in self.mainwindow.tabs.widgets: try: - # FIXME should that be encoded? - url = tab.cur_url.toString() + url = tab.cur_url.toString( + QUrl.RemovePassword | QUrl.FullyEncoded) if url: pages.append(url) except Exception as e: # pylint: disable=broad-except @@ -595,8 +595,8 @@ class Application(QApplication): if pages is None: pages = [] for tab in self.mainwindow.tabs.widgets: - # FIXME should that be encoded? - urlstr = tab.cur_url.toString() + urlstr = tab.cur_url.toString( + QUrl.RemovePassword | QUrl.FullyEncoded) if urlstr: pages.append(urlstr) log.destroy.debug("sys.executable: {}".format(sys.executable))