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

buddypress-trac noreply at wordpress.org
Fri Jan 24 19:17:37 UTC 2014


#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                     |  Resolution:
 Keywords:  dev-feedback needs-patch  |
--------------------------------------+-----------------------------

Comment (by ninnypants):

 The two issues that this seems to cause problems is in areas like mailto
 links and any @name inside of an <a> like @boonebgorges mentioned. I
 initially tried to solve it with a regular expression but the two
 situations are too different to be solved that way, and that still didn't
 solve the issue of replacements. The system should replace @names that
 show up in normal content, but not inside <a>.

 In my solution I replaced offending content with a placeholder `#BPAN`
 with an incremented number attached to the end similar to how some
 markdown libraries do their replacements. This removes @names that we
 don't want replaced long enough for us do the replacements then they are
 added back into the correct location.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4680#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list