From 5031d6bf7864fd5c2926b713ba74d71a75536d87 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 11 Dec 2020 10:14:58 +0000 Subject: [PATCH] Standardize rel --- content.py | 2 +- webapp_column_left.py | 3 ++- webapp_column_right.py | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/content.py b/content.py index dce84199e..424fccd3b 100644 --- a/content.py +++ b/content.py @@ -358,7 +358,7 @@ def addWebLinks(content: str) -> str: if w.endswith('.') or w.endswith(';'): w = w[:-1] markup = '' + '" rel="nofollow noopener noreferrer" target="_blank">' for prefix in prefixes: if w.startswith(prefix): markup += '' diff --git a/webapp_column_left.py b/webapp_column_left.py index 8d91101da..5d3d8b0d3 100644 --- a/webapp_column_left.py +++ b/webapp_column_left.py @@ -216,7 +216,8 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str, # add link to the returned html htmlStr += \ '

' + \ + '" target="_blank" ' + \ + 'rel="nofollow noopener noreferrer">' + \ lineStr + '

\n' linksFileContainsEntries = True else: diff --git a/webapp_column_right.py b/webapp_column_right.py index 589184817..6bc29bdda 100644 --- a/webapp_column_right.py +++ b/webapp_column_right.py @@ -243,7 +243,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool, title = removeLongWords(item[0], 16, []).replace('\n', '
') htmlStr += '

' + \ '' + \ + 'rel="nofollow noopener noreferrer">' + \ '' + title + \ '' + totalVotesStr if moderator: @@ -271,7 +271,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool, if moderator and moderatedItem: htmlStr += '

' + \ '' + \ + 'rel="nofollow noopener noreferrer">' + \ title + '' + totalVotesStr htmlStr += ' ' + dateShown htmlStr += '' + \ '' + \ + 'rel="nofollow noopener noreferrer">' + \ title + '' + \ totalVotesStr htmlStr += ' '