Standardize rel

main
Bob Mottram 2020-12-11 10:14:58 +00:00
parent af76a5809e
commit 5031d6bf78
3 changed files with 6 additions and 5 deletions

View File

@ -358,7 +358,7 @@ def addWebLinks(content: str) -> str:
if w.endswith('.') or w.endswith(';'):
w = w[:-1]
markup = '<a href="' + w + \
'" rel="nofollow noopener" target="_blank">'
'" rel="nofollow noopener noreferrer" target="_blank">'
for prefix in prefixes:
if w.startswith(prefix):
markup += '<span class="invisible">' + prefix + '</span>'

View File

@ -216,7 +216,8 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
# add link to the returned html
htmlStr += \
' <p><a href="' + linkStr + \
'" target="_blank" rel="noopener noreferrer">' + \
'" target="_blank" ' + \
'rel="nofollow noopener noreferrer">' + \
lineStr + '</a></p>\n'
linksFileContainsEntries = True
else:

View File

@ -243,7 +243,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
title = removeLongWords(item[0], 16, []).replace('\n', '<br>')
htmlStr += '<p class="newswireItemVotedOn">' + \
'<a href="' + item[1] + '" target="_blank" ' + \
'rel="noopener noreferrer">' + \
'rel="nofollow noopener noreferrer">' + \
'<span class="newswireItemVotedOn">' + title + \
'</span></a>' + totalVotesStr
if moderator:
@ -271,7 +271,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
if moderator and moderatedItem:
htmlStr += '<p class="newswireItemModerated">' + \
'<a href="' + item[1] + '" target="_blank" ' + \
'rel="noopener noreferrer">' + \
'rel="nofollow noopener noreferrer">' + \
title + '</a>' + totalVotesStr
htmlStr += ' ' + dateShown
htmlStr += '<a href="/users/' + nickname + \
@ -283,7 +283,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
else:
htmlStr += '<p class="newswireItem">' + \
'<a href="' + item[1] + '" target="_blank" ' + \
'rel="noopener noreferrer">' + \
'rel="nofollow noopener noreferrer">' + \
title + '</a>' + \
totalVotesStr
htmlStr += ' <span class="newswireDate">'