Fix implicit mention detection regular expression flags in ActivityPub\Processor
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 9 Mar 2019 14:04:11 +0000 (09:04 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 9 Mar 2019 14:04:11 +0000 (09:04 -0500)
src/Protocol/ActivityPub/Processor.php

index fafc26b..abd36f3 100644 (file)
@@ -710,7 +710,7 @@ class Processor
                $kept_mentions = [];
 
                // Extract one prepended mention at a time from the body
-               while(preg_match('#^(@\[url=([^\]]+)].*?\[\/url]\s)(.*)#mis', $body, $matches)) {
+               while(preg_match('#^(@\[url=([^\]]+)].*?\[\/url]\s)(.*)#is', $body, $matches)) {
                        if (!in_array($matches[2], $potential_mentions) ) {
                                $kept_mentions[] = $matches[1];
                        }