From 4ba2d840d19ba55032951afef3fe7ea8edd6c8bf Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 30 Aug 2018 07:46:01 +0200 Subject: Elide URLs at the end and not in the middle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- qutebrowser/mainwindow/statusbar/url.py | 3 +-- 1 file changed, 1 insertion(+), 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 -- cgit v1.2.3-54-g00ecf