1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00

metadata: error on url titles that aren't

This commit is contained in:
Daniel Martí 2015-08-28 15:48:53 -07:00
parent 2c52f67cb1
commit e0870f6e76

View File

@ -341,6 +341,8 @@ class DescriptionFormatter:
else: else:
urltxt = url[index2 + 1:] urltxt = url[index2 + 1:]
url = url[:index2] url = url[:index2]
if url == urltxt:
raise MetaDataException("Url title is just the URL - use [url]")
linkified_html += '<a href="' + url + '">' + cgi.escape(urltxt) + '</a>' linkified_html += '<a href="' + url + '">' + cgi.escape(urltxt) + '</a>'
linkified_plain += urltxt linkified_plain += urltxt
if urltxt != url: if urltxt != url: