]> git.mxchange.org Git - friendica.git/commitdiff
Diaspora: Widen the magic link regular expression
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 19 Oct 2018 02:39:06 +0000 (22:39 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 19 Oct 2018 02:39:06 +0000 (22:39 -0400)
src/Content/Text/BBCode.php
src/Protocol/Diaspora.php

index 8d5da11cdaae4b8477346642bb98dfe106924e25..be2054067b25b68a9a898e9f732a524390cd11db 100644 (file)
@@ -1319,7 +1319,7 @@ class BBCode extends BaseObject
 
                // Handle Diaspora posts
                $text = preg_replace_callback(
-                       "&\[url=/posts/([^\[\]]*)\](.*)\[\/url\]&Usi",
+                       "&\[url=/?posts/([^\[\]]*)\](.*)\[\/url\]&Usi",
                        function ($match) {
                                return "[url=" . System::baseUrl() . "/display/" . $match[1] . "]" . $match[2] . "[/url]";
                        }, $text
index 0c3a52b2d3810ede4ce05e3348773486d8fda19a..5792d56b6eeef6cc0e28e6315cbb08f8ed939d6f 100644 (file)
@@ -1200,7 +1200,7 @@ class Diaspora
                );
 
                preg_replace_callback(
-                       "&\[url=/posts/([^\[\]]*)\](.*)\[\/url\]&Usi",
+                       "&\[url=/?posts/([^\[\]]*)\](.*)\[\/url\]&Usi",
                        function ($match) use ($item) {
                                self::fetchGuidSub($match, $item);
                        },