will be shut down on June 1, 2019. At that point this instance will be unreachable and all data will be irrevocably deleted. More details at

Commit ee29b23b authored by mmn's avatar mmn

Fix URL mention regular expression FOR REALZ

parent 48276556
......@@ -300,7 +300,9 @@ class OStatusPlugin extends Plugin
static function extractUrlMentions($text)
$wmatches = array();
$result = preg_match_all('/(?:^|\s+)@('.URL_REGEX_DOMAIN_NAME.'(?:\/\w+)*)/',
// In the regexp below we need to match / _before_ URL_REGEX_VALID_PATH_CHARS because it otherwise gets merged
// with the TLD before (but / is in URL_REGEX_VALID_PATH_CHARS anyway, it's just its positioning that is important)
$result = preg_match_all('/(?:^|\s+)@('.URL_REGEX_DOMAIN_NAME.'(?:\/['.URL_REGEX_VALID_PATH_CHARS.']*)*)/',
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment