Skip to:
Content

BuddyPress.org

Ticket #2057: 2057.patch

File 2057.patch, 2.3 KB (added by SergeyBiryukov, 14 years ago)
  • bp-activity/bp-activity-functions.php

     
    1919 * @return array $usernames Array of the found usernames that match existing users
    2020 */
    2121function bp_activity_find_mentions( $content ) {
    22         $pattern = '/[@]+([A-Za-z0-9-_\.]+)/';
     22        $pattern = '/[@]+([A-Za-z0-9-_\.@]+)/';
    2323        preg_match_all( $pattern, $content, $usernames );
    2424
    2525        // Make sure there's only one instance of each username
  • bp-activity/bp-activity-notifications.php

     
    1212        global $bp;
    1313
    1414        /* Scan for @username strings in an activity update. Notify each user. */
    15         $pattern = '/[@]+([A-Za-z0-9-_\.]+)/';
     15        $pattern = '/[@]+([A-Za-z0-9-_\.@]+)/';
    1616        preg_match_all( $pattern, $content, $usernames );
    1717
    1818        /* Make sure there's only one instance of each username */
  • bp-forums/bp-forums-filters.php

     
    123123
    124124        $content = htmlspecialchars_decode( $content );
    125125
    126         $pattern = "|<a href=&#039;" . bp_get_root_domain() . "/" . $bp->members->slug . "/[A-Za-z0-9-_\.]+/&#039; rel=&#039;nofollow&#039;>(@[A-Za-z0-9-_\.]+)</a>|";
     126        $pattern = "|<a href=&#039;" . bp_get_root_domain() . "/" . $bp->members->slug . "/[A-Za-z0-9-_\.]+/&#039; rel=&#039;nofollow&#039;>(@[A-Za-z0-9-_\.@]+)</a>|";
    127127
    128128        $content = preg_replace( $pattern, "$1", $content );
    129129
  • bp-groups/bp-groups-notifications.php

     
    253253        global $bp;
    254254
    255255        /* Scan for @username strings in an activity update. Notify each user. */
    256         $pattern = '/[@]+([A-Za-z0-9-_\.]+)/';
     256        $pattern = '/[@]+([A-Za-z0-9-_\.@]+)/';
    257257        preg_match_all( $pattern, $content, $usernames );
    258258
    259259        /* Make sure there's only one instance of each username */