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 '';
+ $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 '';
+ } else {
+ return '';
+ }
},
$text
);