summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2018-08-30 07:46:01 +0200
committerFlorian Bruhin <git@the-compiler.org>2018-08-30 07:50:46 +0200
commit4ba2d840d19ba55032951afef3fe7ea8edd6c8bf (patch)
treee97915786f636c8b052b764fb0d0db59c621c42e
parent98600099e5380de7c34468a3645b7b883cfd5bb9 (diff)
downloadqutebrowser-4ba2d840d19ba55032951afef3fe7ea8edd6c8bf.tar.gz
qutebrowser-4ba2d840d19ba55032951afef3fe7ea8edd6c8bf.zip
Elide URLs at the end and not in the middle
With a URL like http://www.example.com/long/path/end, an elision like http://www.example.com/…/path/end would be nicest, but using ElideMiddle means we can end up with something like http://www.example.…/path/end, which can possibly trick a user during a phishing attempt. Instead, let's just always elide at the end, so we end up with http://www.example.com/long/…. That makes sure the scheme/hostname (which are most important) are visible as long as possible. Fixes #4170. (cherry picked from commit a13607674fcb5c1ccd8914e48da5ae626a35f951)
-rw-r--r--qutebrowser/mainwindow/statusbar/url.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/qutebrowser/mainwindow/statusbar/url.py b/qutebrowser/mainwindow/statusbar/url.py
index f24e79834..c9f17db1b 100644
--- a/qutebrowser/mainwindow/statusbar/url.py
+++ b/qutebrowser/mainwindow/statusbar/url.py
@@ -80,8 +80,7 @@ class UrlText(textbase.TextBase):
"""
def __init__(self, parent=None):
- """Override TextBase.__init__ to elide in the middle by default."""
- super().__init__(parent, Qt.ElideMiddle)
+ super().__init__(parent)
self.setObjectName(self.__class__.__name__)
config.set_register_stylesheet(self)
self._hover_url = None