#3067 closed defect (bug) (fixed)
bbp_rel_nofollow() can create multiple rel attributes
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | 2.3.1 |
Component: | API - Formatting | Keywords: | |
Cc: |
Description
In [4866], wp_rel_nofollow()
was replaced with bbp_rel_nofollow()
.
It's not quite clear to me from the commit message what was wrong with wp_rel_nofollow()
, as bbp_rel_nofollow()
is almost identical to what was in WordPress trunk at the time, except for stripslashes()
/wp_slash()
.
The issue is that bbp_rel_nofollow()
in its current form does not account for two cases:
<a href="foo" rel="bar nofollow">
is turned into<a href="foo" rel="bar nofollow" rel="nofollow">
, and multiplerel
attributes is invalid markup. This was fixed for WordPress in [WP34277], see #WP9959.- Links with the site's own domain should not be nofollowed. This was fixed for WordPress in [WP36125], see #WP11360.
Any chance for bbPress to use wp_rel_nofollow()
again? If not, I'll submit a patch that backports [WP34277] and [WP36125] to bbp_rel_nofollow()
, with some unit tests.
Change History (6)
Note: See
TracTickets for help on using
tickets.
The bbPress specific version was used for links inside of code blocks dating back to 2013, and WordPress caught up in 2015.
We can deprecate/delete the bbPress version if they're now equal. It's basically only used internally or via filters.