Merge pull request #6650 from rabuzarus/20190213_-_fix_frio_linkpreview_for_display_m...
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 13 Feb 2019 21:38:27 +0000 (16:38 -0500)
committerGitHub <noreply@github.com>
Wed, 13 Feb 2019 21:38:27 +0000 (16:38 -0500)
bugfix: linkPreview - remove s flag from regexp because FF don't support it

src/Protocol/ActivityPub/Processor.php

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