mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2025-01-26 07:05:13 +00:00
Use rel attributes on links in the info field (#463)
This commit is contained in:
parent
e9b1f6a6c4
commit
ad5ea6d91e
|
@ -221,7 +221,8 @@ class TorrentBase(DeclarativeHelperBase):
|
||||||
invalid_url_characters = '<>"'
|
invalid_url_characters = '<>"'
|
||||||
# Check if url contains invalid characters
|
# Check if url contains invalid characters
|
||||||
if not any(c in url for c in invalid_url_characters):
|
if not any(c in url for c in invalid_url_characters):
|
||||||
return '<a href="{0}">{1}</a>'.format(url, escape_markup(unquote_url(url)))
|
return('<a rel="noopener noreferrer nofollow" '
|
||||||
|
'href="{0}">{1}</a>'.format(url, escape_markup(unquote_url(url))))
|
||||||
# Escaped
|
# Escaped
|
||||||
return escape_markup(self.information)
|
return escape_markup(self.information)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue