Skip to content

Commit 342543c

Browse files
committed
issue2550775 enhancement. Add rel=nofollow to journal links
1 parent 2b82644 commit 342543c

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Entries without name were done by Richard Jones.
77

88
Features:
99

10+
- issue2550775 Added rel=nofollow to links in the journal linking to
11+
attachments to allow the admin to delete attachment spam and prevent
12+
search engines from increasing the rankings. (John Rouillard)
1013
- issue2550808 Enhanced the boolean field template function. Now by
1114
default the labels generated can be clicked on and select the
1215
corresponding radio button. Also can create a trivalued radiobutton

roundup/cgi/templating.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ def history(self, direction='descending', dre=re.compile('^\d+$'),
889889
pass
890890
else:
891891
id = self._klass.get(self._nodeid, prop_n, None)
892-
current[prop_n] = '<a href="%s%s">%s</a>'%(
892+
current[prop_n] = '<a rel="nofollow" href="%s%s">%s</a>'%(
893893
classname, id, current[prop_n])
894894

895895
# get the journal, sort and reverse
@@ -910,15 +910,15 @@ def history(self, direction='descending', dre=re.compile('^\d+$'),
910910
if action == 'link' and type(args) == type(()):
911911
if len(args) == 3:
912912
linkcl, linkid, key = args
913-
arg_s += '<a href="%s%s">%s%s %s</a>'%(linkcl, linkid,
913+
arg_s += '<a rel="nofollow" href="%s%s">%s%s %s</a>'%(linkcl, linkid,
914914
linkcl, linkid, key)
915915
else:
916916
arg_s = str(args)
917917

918918
elif action == 'unlink' and type(args) == type(()):
919919
if len(args) == 3:
920920
linkcl, linkid, key = args
921-
arg_s += '<a href="%s%s">%s%s %s</a>'%(linkcl, linkid,
921+
arg_s += '<a rel="nofollow" href="%s%s">%s%s %s</a>'%(linkcl, linkid,
922922
linkcl, linkid, key)
923923
else:
924924
arg_s = str(args)
@@ -988,7 +988,7 @@ def history(self, direction='descending', dre=re.compile('^\d+$'),
988988
subml.append('<strike>%s</strike>'%label)
989989
else:
990990
if hrefable:
991-
subml.append('<a href="%s%s">%s</a>'%(
991+
subml.append('<a rel="nofollow" href="%s%s">%s</a>'%(
992992
classname, linkid, label))
993993
elif label is None:
994994
subml.append('%s%s'%(classname,
@@ -1015,7 +1015,7 @@ def history(self, direction='descending', dre=re.compile('^\d+$'),
10151015
label = None
10161016
if label is not None:
10171017
if hrefable:
1018-
old = '<a href="%s%s">%s</a>'%(classname,
1018+
old = '<a ref="nofollow" href="%s%s">%s</a>'%(classname,
10191019
args[k], label)
10201020
else:
10211021
old = label;

0 commit comments

Comments
 (0)