diff roundup/cgi/templating.py @ 5190:89b1870b1bc9

Make url's in messages identified as http://... or https://... have the rel="nofollow" attribute to reduce the value of spamming public trackers. Internal links: issue20 msg10 etc. won't have the nofollow attribute.
author John Rouillard <rouilj@ieee.org>
date Sat, 25 Feb 2017 21:01:50 -0500
parents a40ea636a2ad
children fe52cab8f5b5
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Sat Feb 25 17:48:46 2017 -0500
+++ b/roundup/cgi/templating.py	Sat Feb 25 21:01:50 2017 -0500
@@ -1337,7 +1337,7 @@
 
     def _hyper_repl(self, match):
         if match.group('url'):
-            return self._hyper_repl_url(match, '<a href="%s">%s</a>%s')
+            return self._hyper_repl_url(match, '<a href="%s" rel="nofollow">%s</a>%s')
         elif match.group('email'):
             return self._hyper_repl_email(match, '<a href="mailto:%s">%s</a>')
         elif len(match.group('id')) < 10:

Roundup Issue Tracker: http://roundup-tracker.org/