qmsk.irclogs: format html logline urls with <a rel='nofollow'>
authorterom
Thu, 25 Sep 2014 11:36:23 +0300
changeset 151 6b8b6e056cdb
parent 149 5e8279dec643
child 152 a2f622ca926f
qmsk.irclogs: format html logline urls with <a rel='nofollow'>
qmsk/irclogs/log_formatter.py
--- a/qmsk/irclogs/log_formatter.py	Wed Mar 07 21:38:19 2012 +0200
+++ b/qmsk/irclogs/log_formatter.py	Thu Sep 25 11:36:23 2014 +0300
@@ -146,7 +146,7 @@
             url_html = match.group(0)
             url_link = xml.sax.saxutils.unescape(url_html)
 
-            return '<a href="%(url_link)s">%(url_html)s</a>' % dict(url_link=url_link, url_html=url_html)
+            return '<a href="%(url_link)s" rel="nofollow">%(url_html)s</a>' % dict(url_link=url_link, url_html=url_html)
 
         return self.URL_REGEXP.sub(_encode_url, line)