[preview] Fix faulty conversion of text to url
This commit is contained in:
@@ -168,6 +168,11 @@ class Base(object):
|
|||||||
def print_real_text(self, real_text, text_tags, graphics, iter_,
|
def print_real_text(self, real_text, text_tags, graphics, iter_,
|
||||||
additional_data):
|
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)
|
urlparts = urlparse(real_text)
|
||||||
if not self._accept_uri(urlparts, real_text, additional_data):
|
if not self._accept_uri(urlparts, real_text, additional_data):
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user