Somewhat simpler regex. Thanks acct:takeshitakenji@gs.kawa-kun.com
This commit is contained in:
parent
c4541d8f5b
commit
95f991cff3
@ -264,7 +264,8 @@ class OStatusPlugin extends Plugin
|
||||
static function extractWebfingerIds($text)
|
||||
{
|
||||
$wmatches = array();
|
||||
$result = preg_match_all('/(?:^|\s+)@((?:\w+[\w\-\_\.]?)*(?:[\w\-\_\.]*\w+)@'.URL_REGEX_DOMAIN_NAME.')/',
|
||||
// Maybe this should harmonize with lib/nickname.php and Nickname::WEBFINGER_FMT
|
||||
$result = preg_match_all('/(?<!\S)@((?:\w+[\w\-\_\.]*)?\w+@'.URL_REGEX_DOMAIN_NAME.')/',
|
||||
$text,
|
||||
$wmatches,
|
||||
PREG_OFFSET_CAPTURE);
|
||||
|
Loading…
Reference in New Issue
Block a user