Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 4791:140d4c2469db
issue2550775 enhancement. Add rel=nofollow to journal links
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 08 Jun 2013 22:01:52 -0400 |
| parents | 888676704342 |
| children | bc4144417861 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Wed May 29 15:51:20 2013 +0200 +++ b/roundup/cgi/templating.py Sat Jun 08 22:01:52 2013 -0400 @@ -889,7 +889,7 @@ pass else: id = self._klass.get(self._nodeid, prop_n, None) - current[prop_n] = '<a href="%s%s">%s</a>'%( + current[prop_n] = '<a rel="nofollow" href="%s%s">%s</a>'%( classname, id, current[prop_n]) # get the journal, sort and reverse @@ -910,7 +910,7 @@ if action == 'link' and type(args) == type(()): if len(args) == 3: linkcl, linkid, key = args - arg_s += '<a href="%s%s">%s%s %s</a>'%(linkcl, linkid, + arg_s += '<a rel="nofollow" href="%s%s">%s%s %s</a>'%(linkcl, linkid, linkcl, linkid, key) else: arg_s = str(args) @@ -918,7 +918,7 @@ elif action == 'unlink' and type(args) == type(()): if len(args) == 3: linkcl, linkid, key = args - arg_s += '<a href="%s%s">%s%s %s</a>'%(linkcl, linkid, + arg_s += '<a rel="nofollow" href="%s%s">%s%s %s</a>'%(linkcl, linkid, linkcl, linkid, key) else: arg_s = str(args) @@ -988,7 +988,7 @@ subml.append('<strike>%s</strike>'%label) else: if hrefable: - subml.append('<a href="%s%s">%s</a>'%( + subml.append('<a rel="nofollow" href="%s%s">%s</a>'%( classname, linkid, label)) elif label is None: subml.append('%s%s'%(classname, @@ -1015,7 +1015,7 @@ label = None if label is not None: if hrefable: - old = '<a href="%s%s">%s</a>'%(classname, + old = '<a ref="nofollow" href="%s%s">%s</a>'%(classname, args[k], label) else: old = label;
