[buddypress-trac] [BuddyPress] #3721: Mentions do not work if there is a period after the username.

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Oct 28 20:15:55 UTC 2011


#3721: Mentions do not work if there is a period after the username.
--------------------------+-----------------------------
 Reporter:  lsparks       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Activity      |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 It appears that mentions do not work if there is a period directly after
 them.

 Example: Hey, everyone say hi to @username.

 I took a look at bp_activity_find_mentions() and it appears the expression
 used to allow usernames like @first.last includes the period all the time,
 so it incorrectly matches the actual punctuation period as part of the
 username when the name is at the end of a punctuated sentence. This causes
 an issue because the username with the period on the end is not
 technically correct and will not trigger any the notifications or
 highlighting.

 I tried adding a word boundary to the end of the existing expression to
 get /[@]+([A-Za-z0-9-_.\@]+)\b/ and that seems to work in the limited
 testing I have done.

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


More information about the buddypress-trac mailing list