From ecf0b67d9dead04bb799063ba3c60308de547b45 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 6 Jul 2021 16:10:10 +0000 Subject: [PATCH] Just look at HTTP links --- src/Model/Post/Link.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } -- 2.39.5