[buddypress-trac] [BuddyPress] #4680: @-mentions getting linked even when already inside a link

buddypress-trac noreply at wordpress.org
Tue Nov 20 15:13:10 UTC 2012

#4680: @-mentions getting linked even when already inside a link
 Reporter:  boonebgorges  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  low           |  Milestone:  Future Release
Component:  Core          |    Version:
 Severity:  minor         |   Keywords:  dev-feedback needs-patch
 Imagine you're creating a link to a twitter profile in a blog post/page:

 <a href="http://twitter.com/boone">@boone</a>

 Imagine also that there's a local user with the user_nicename `boone`.

 The @-mention filter finds `@boone` and does this:

 <a href="http://twitter.com/boone"></a><a
 href="http://example.com/members/boone3/" rel="nofollow">@boone3</a>

 Not 100% sure what the best fix is for this edge case. Probably: adjust
 the regex so that it skips @-mentions already inside of `<a>...</a>`. (not
 sure how this regex would look. Might have to do some PHP logic or break
 it into multiple regex matches) Thoughts?

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4680>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list