From: Michael Date: Mon, 20 Mar 2023 21:33:39 +0000 (+0000) Subject: Issue 12701: Fix Markdown problems with Quotes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0f9099dec62edafa61248e07a16ffc85499e17d6;p=friendica.git Issue 12701: Fix Markdown problems with Quotes --- diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index b72dcc3c4e..930b94ac46 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1567,8 +1567,13 @@ class BBCode "/\[[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); - return '' . $matches[2] . ''; + $alt = htmlspecialchars($matches[2], ENT_COMPAT); + // Fix for Markdown problems wirh Diaspora, see issue #12701 + if (($simple_html != self::DIASPORA) || strpos($matches[2], '"') === false) { + return '' . $alt . ''; + } else { + return '' . $alt . ''; + } }, $text );