X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FText%2FBBCode.php;h=a38d2de7856ec39f7c24c38c36d7a5af6c92eee2;hb=a8402109b183e81dad4e5443883dd292df094b86;hp=81e1476b584ac13f2bf939cb4bf93b04027b7fa7;hpb=f65c71a25bcade6c3aacbff6a1ec36132c780e40;p=friendica.git diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 81e1476b58..a38d2de785 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1475,8 +1475,8 @@ class BBCode $text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '

', $text); $text = preg_replace("/\[list=((?-i)a)\](.*?)\[\/list\]/ism", '

', $text); $text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '

', $text); - $text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '

', $text); - $text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '

', $text); + $text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '

', $text); + $text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '

    $1

', $text); $text = preg_replace("/\[li\](.*?)\[\/li\]/ism", '

  • $1
  • ', $text); } @@ -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 with Diaspora, see issue #12701 + if (($simple_html != self::DIASPORA) || strpos($matches[2], '"') === false) { + return '' . $alt . ''; + } else { + return '' . $alt . ''; + } }, $text );