From: Michael Date: Tue, 6 Jul 2021 16:10:10 +0000 (+0000) Subject: Just look at HTTP links X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ecf0b67d9dead04bb799063ba3c60308de547b45;p=friendica.git Just look at HTTP links --- diff --git a/src/Model/Post/Link.php b/src/Model/Post/Link.php index 3bd92bfe34..7cce4e206b 100644 --- a/src/Model/Post/Link.php +++ b/src/Model/Post/Link.php @@ -103,19 +103,19 @@ class Link */ public static function insertFromBody(int $uriid, string $body) { - if (preg_match_all("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", $body, $pictures, PREG_SET_ORDER)) { + if (preg_match_all("/\[img\=([0-9]*)x([0-9]*)\](http.*?)\[\/img\]/ism", $body, $pictures, PREG_SET_ORDER)) { foreach ($pictures as $picture) { $body = str_replace($picture[3], self::getByLink($uriid, $picture[3]), $body); } } - if (preg_match_all("/\[img=([^\[\]]*)\]([^\[\]]*)\[\/img\]/Usi", $body, $pictures, PREG_SET_ORDER)) { + if (preg_match_all("/\[img=(http[^\[\]]*)\]([^\[\]]*)\[\/img\]/Usi", $body, $pictures, PREG_SET_ORDER)) { foreach ($pictures as $picture) { $body = str_replace($picture[1], self::getByLink($uriid, $picture[1]), $body); } } - if (preg_match_all("/\[img\]([^\[\]]*)\[\/img\]/ism", $body, $pictures, PREG_SET_ORDER)) { + if (preg_match_all("/\[img\](http[^\[\]]*)\[\/img\]/ism", $body, $pictures, PREG_SET_ORDER)) { foreach ($pictures as $picture) { $body = str_replace($picture[1], self::getByLink($uriid, $picture[1]), $body); }