Opened 6 months ago

#4680 new defect (bug)

@-mentions getting linked even when already inside a link

Reported by: boonebgorges Owned by:
Priority: low Milestone: Future Release
Component: Core Version:
Severity: minor Keywords: dev-feedback needs-patch
Cc:

Description

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?

Change History (0)

Note: See TracTickets for help on using tickets.