def add_rel_nofollow(html):
    try:
        parser = AddAttributesHTMLFilter({'a': [('rel', 'nofollow')]})
        parser.feed(html)
        output_html = parser.html
        parser.close()
    except HTMLParseError:
        # HTMLParser from Python <2.7.3 is not robust
        # see: http://support.djangobb.org/topic/349/
        if settings.DEBUG:
            raise
        return html
    return output_html
Add rel="nofollow" to <a> tags so that search engines don't give them weight.
dataset/ETHPy150Open slav0nic/djangobb/djangobb_forum/util.py/add_rel_nofollow