Opened 15 years ago
Closed 9 years ago
#11359 closed enhancement (wontfix)
Don't nofollow links in admin comments
Reported by: | caesarsgrunt | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.9 |
Component: | Comments | Keywords: | gsoc has-patch needs-testing close |
Focuses: | Cc: |
Description
Links in admin comments shouldn't have rel=nofollow.
Admin comments are not user-generated content, and the site owner (admin) is vouching for the links just like when they link from the post itself.
Therefore, this usage of nofollow is incorrect.
Also, if I go and edit a comment and remove nofollow from a link, WP adds it back. It shouldn't do that either.
Note that in the unlikely event of wanting a link in a comment to be nofollowed, this could still be done manually.
Attachments (4)
Change History (18)
#4
@
15 years ago
Related:
add_filter( 'pre_comment_content', 'wp_rel_nofollow', 15 );
from: file wp-includes/default-filters.php line 158.
wp_rel_nofollow() is in wp-includes/formatting.php line 1373.
A fix could be to remove the original filter, add and own as proxy and then check for the comments author. The problem is, that this filter knows nothing about the actual comment. Only the comment text and that's it. Those information can be passed as additional parameter when applying the filter. see wp_filter_comment().
#5
@
15 years ago
I remember that we had a related problem years ago while comment stati where checked / filtered. I think we should pass the actual comment object to those filters as well which will plugin authors enable to differ (and even core functions enable to differ here).
#6
follow-up:
↓ 9
@
15 years ago
- Milestone changed from 3.0 to Future Release
- Type changed from defect (bug) to enhancement
#9
in reply to:
↑ 6
@
14 years ago
- Cc Everfluxx added
- Version changed from 2.9 to 3.1
Replying to nacin:
Still outstanding in 3.1: current version also adds a "rel=external nofollow" attribute to all author URI links in comments, regardless whether the author URI is actually external.
The rel="external" attribute indicates that the referenced document is not part of the same web site as the current document. (Source)
I wrote an open letter to Matt Mullenweg about the default nofollow on admin comment links issue, and Matt replied to me via email saying that (I'm quoting him verbatim):
People are free to modify WP's default behaviour through plugins, of which there are many in our official directory. I think the current behaviour is the best as default based on our own experience and advice from Google when nofollow was introduced.
Matt did note provide further details as to why he thinks that the current behavior is "the best as default", and did not answer my questions:
How can nofollowing editorial links help combat link spam? How can that benefit users, or search engines?
So, if he didn't change his mind, I didn't change mine, either.
Therefore, I propose to implement the following behavior as default in WordPress:
Automatically add the "rel=nofollow" attribute to all links in comments, except those posted or edited by users with edit_comment capability.
Since I'm not familiar with the discussion, submission and review process for core updates, any pointers or advice would be greatly appreciated. I'm willing to post this to the wp-hackers mailing list and get feedback from other developers and users if deemed necessary. Last but not least, I am willing to contribute a patch for this enhancement.
#10
@
13 years ago
- Version changed from 3.1 to 2.9
Please don't change the Version - it represents the time the bug was first reported, not whether it still exists in the current version.
#13
@
9 years ago
- Keywords close added
After discussing with Konstantin Obenland we came to the conclusion that this feature is plugin territory. It can be achieved by creating a plugin, though it might not be straightforward to develop. However, separate bugs should be opened for example for missing filters.
See also #11360(Don't nofollow links within the site).