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.
This commit is contained in:
Florian Bruhin 2018-08-30 07:46:01 +02:00
parent d337ed885a
commit a13607674f

View File

@ -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