[preview] Fix faulty conversion of text to url

This commit is contained in:
Philipp Hörist
2018-08-06 23:55:07 +02:00
parent 271a95e614
commit 059fa25edf

View File

@@ -168,6 +168,11 @@ class Base(object):
def print_real_text(self, real_text, text_tags, graphics, iter_,
additional_data):
if len(real_text.split(' ')) > 1:
# urlparse dont recognises spaces as URL delimiter
log.error('Url with text will not be displayed: %s', real_text)
return
urlparts = urlparse(real_text)
if not self._accept_uri(urlparts, real_text, additional_data):
return