1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-11 15:13:27 +02:00

Detect most bad URLs

Also [appid] links that should really be [[appid]]
This commit is contained in:
Daniel Martí 2015-05-13 13:05:42 +02:00
parent bd3303c43d
commit dd70c9441c

View File

@ -339,6 +339,8 @@ class DescriptionFormatter:
else:
urltxt = url[index2 + 1:]
url = url[:index2]
if ':' not in url:
raise MetaDataException("'%s' doesn't look like an URL" % url)
linkified_html += '<a href="' + url + '">' + cgi.escape(urltxt) + '</a>'
linkified_plain += urltxt
if urltxt != url: