forked from indymedia/epicyon
Standardize rel
parent
af76a5809e
commit
5031d6bf78
|
@ -358,7 +358,7 @@ def addWebLinks(content: str) -> str:
|
||||||
if w.endswith('.') or w.endswith(';'):
|
if w.endswith('.') or w.endswith(';'):
|
||||||
w = w[:-1]
|
w = w[:-1]
|
||||||
markup = '<a href="' + w + \
|
markup = '<a href="' + w + \
|
||||||
'" rel="nofollow noopener" target="_blank">'
|
'" rel="nofollow noopener noreferrer" target="_blank">'
|
||||||
for prefix in prefixes:
|
for prefix in prefixes:
|
||||||
if w.startswith(prefix):
|
if w.startswith(prefix):
|
||||||
markup += '<span class="invisible">' + prefix + '</span>'
|
markup += '<span class="invisible">' + prefix + '</span>'
|
||||||
|
|
|
@ -216,7 +216,8 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
# add link to the returned html
|
# add link to the returned html
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
' <p><a href="' + linkStr + \
|
' <p><a href="' + linkStr + \
|
||||||
'" target="_blank" rel="noopener noreferrer">' + \
|
'" target="_blank" ' + \
|
||||||
|
'rel="nofollow noopener noreferrer">' + \
|
||||||
lineStr + '</a></p>\n'
|
lineStr + '</a></p>\n'
|
||||||
linksFileContainsEntries = True
|
linksFileContainsEntries = True
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -243,7 +243,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
|
||||||
title = removeLongWords(item[0], 16, []).replace('\n', '<br>')
|
title = removeLongWords(item[0], 16, []).replace('\n', '<br>')
|
||||||
htmlStr += '<p class="newswireItemVotedOn">' + \
|
htmlStr += '<p class="newswireItemVotedOn">' + \
|
||||||
'<a href="' + item[1] + '" target="_blank" ' + \
|
'<a href="' + item[1] + '" target="_blank" ' + \
|
||||||
'rel="noopener noreferrer">' + \
|
'rel="nofollow noopener noreferrer">' + \
|
||||||
'<span class="newswireItemVotedOn">' + title + \
|
'<span class="newswireItemVotedOn">' + title + \
|
||||||
'</span></a>' + totalVotesStr
|
'</span></a>' + totalVotesStr
|
||||||
if moderator:
|
if moderator:
|
||||||
|
@ -271,7 +271,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
|
||||||
if moderator and moderatedItem:
|
if moderator and moderatedItem:
|
||||||
htmlStr += '<p class="newswireItemModerated">' + \
|
htmlStr += '<p class="newswireItemModerated">' + \
|
||||||
'<a href="' + item[1] + '" target="_blank" ' + \
|
'<a href="' + item[1] + '" target="_blank" ' + \
|
||||||
'rel="noopener noreferrer">' + \
|
'rel="nofollow noopener noreferrer">' + \
|
||||||
title + '</a>' + totalVotesStr
|
title + '</a>' + totalVotesStr
|
||||||
htmlStr += ' ' + dateShown
|
htmlStr += ' ' + dateShown
|
||||||
htmlStr += '<a href="/users/' + nickname + \
|
htmlStr += '<a href="/users/' + nickname + \
|
||||||
|
@ -283,7 +283,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
|
||||||
else:
|
else:
|
||||||
htmlStr += '<p class="newswireItem">' + \
|
htmlStr += '<p class="newswireItem">' + \
|
||||||
'<a href="' + item[1] + '" target="_blank" ' + \
|
'<a href="' + item[1] + '" target="_blank" ' + \
|
||||||
'rel="noopener noreferrer">' + \
|
'rel="nofollow noopener noreferrer">' + \
|
||||||
title + '</a>' + \
|
title + '</a>' + \
|
||||||
totalVotesStr
|
totalVotesStr
|
||||||
htmlStr += ' <span class="newswireDate">'
|
htmlStr += ' <span class="newswireDate">'
|
||||||
|
|
Loading…
Reference in New Issue