From e73d1e13c2aed9cbf90ab0dc47b587c2ca412bfa Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 18 Mar 2023 07:05:38 +0000 Subject: [PATCH] Issue 12870: Support for zmg elements from Hubzilla --- src/Content/Text/BBCode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 2e133372d5..d329c1e326 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1562,7 +1562,7 @@ class BBCode $text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*)\](.*?)\[\/zmg\]/ism", '', $text); $text = preg_replace_callback( - "/\[img\=(.*?)\](.*?)\[\/img\]/ism", + "/\[[iz]mg\=(.*?)\](.*?)\[\/[iz]mg\]/ism", function ($matches) use ($simple_html, $uriid) { $matches[1] = self::proxyUrl($matches[1], $simple_html, $uriid); $matches[2] = htmlspecialchars($matches[2], ENT_COMPAT); @@ -1574,7 +1574,7 @@ class BBCode // Images // [img]pathtoimage[/img] $text = preg_replace_callback( - "/\[img\](.*?)\[\/img\]/ism", + "/\[[iz]mg\](.*?)\[\/[iz]mg\]/ism", function ($matches) use ($simple_html, $uriid) { if (strpos($matches[1], "data:image/") === 0) { return $matches[0]; -- 2.39.5