Issue 12701: Fix Markdown problems with Quotes
This commit is contained in:
parent
0b1f67f5b3
commit
0f9099dec6
1 changed files with 7 additions and 2 deletions
|
@ -1567,8 +1567,13 @@ class BBCode
|
||||||
"/\[[iz]mg\=(.*?)\](.*?)\[\/[iz]mg\]/ism",
|
"/\[[iz]mg\=(.*?)\](.*?)\[\/[iz]mg\]/ism",
|
||||||
function ($matches) use ($simple_html, $uriid) {
|
function ($matches) use ($simple_html, $uriid) {
|
||||||
$matches[1] = self::proxyUrl($matches[1], $simple_html, $uriid);
|
$matches[1] = self::proxyUrl($matches[1], $simple_html, $uriid);
|
||||||
$matches[2] = htmlspecialchars($matches[2], ENT_COMPAT);
|
$alt = htmlspecialchars($matches[2], ENT_COMPAT);
|
||||||
return '<img src="' . $matches[1] . '" alt="' . $matches[2] . '" title="' . $matches[2] . '">';
|
// Fix for Markdown problems wirh Diaspora, see issue #12701
|
||||||
|
if (($simple_html != self::DIASPORA) || strpos($matches[2], '"') === false) {
|
||||||
|
return '<img src="' . $matches[1] . '" alt="' . $alt . '" title="' . $alt . '">';
|
||||||
|
} else {
|
||||||
|
return '<img src="' . $matches[1] . '" alt="' . $alt . '">';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
$text
|
$text
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue