diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 3f465cfce..3bb172300 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -604,7 +604,7 @@ class HintManager(QObject): """ for attr in ('href', 'src'): if attr in elem: - text = elem[attr] + text = elem[attr].strip() break else: return None diff --git a/tests/end2end/data/hints/html/with_spaces.html b/tests/end2end/data/hints/html/with_spaces.html new file mode 100644 index 000000000..d2ff52371 --- /dev/null +++ b/tests/end2end/data/hints/html/with_spaces.html @@ -0,0 +1,14 @@ + + + + + + + + Simple link + + + Follow me! + +