What steps will reproduce the problem?
1. Create a comment on lesswrong linking to http://www.jefftk.com/lesswrong.html
2. Example: http://lesswrong.com/lw/7fo/open_thread_september_2011/62l1
What is the expected output? What do you see instead?
The generated html is:
<p>Testing nofollow on
<a href="http://www.jefftk.com/lesswrong.html">a link</a>
that contains 'lesswrong' somewhere but doesn't point to
lesswrong.com.</p>
I would expect to see:
<p>Testing nofollow on
<a href="http://www.jefftk.com/lesswrong.html" rel="nofollow">
a link</a> that contains 'lesswrong' somewhere but doesn't
point to lesswrong.com.</p>
The code responsible for this appears to be:
269 if not re.search('lesswrong|overcomingbias', res):
270 res += ' rel="nofollow"'
In
https://github.com/tricycle/lesswrong/blob/master/r2/r2/lib/contrib/markdown.py
Solving this properly is tricky. Some links that should be left alone:
http://foo.lesswrong.com
http://lesswrong.com
http://lesswrong.com/foo
Some links that should be nofollowed:
http://www.jefftk.com/lesswrong.html
http://lesswrong.jefftk.com
Original issue reported on code.google.com by jeff.t.k...@gmail.com on 19 Mar 2012 at 8:46
Original issue reported on code.google.com by
jeff.t.k...@gmail.com
on 19 Mar 2012 at 8:46