1
1
Fork 0

Diaspora: Widen the magic link regular expression

This commit is contained in:
Hypolite Petovan 2018-10-18 22:39:06 -04:00
parent ca86a9e1d6
commit eb714f0487
2 changed files with 2 additions and 2 deletions

View 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

View 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);
},