Merge pull request #7774 from annando/img-title

Images: Show the description as title
This commit is contained in:
Hypolite Petovan 2019-10-25 19:29:55 -04:00 committed by GitHub
commit b632114b12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1553,7 +1553,7 @@ class BBCode extends BaseObject
function ($matches) use ($simple_html) {
$matches[1] = self::proxyUrl($matches[1], $simple_html);
$matches[2] = htmlspecialchars($matches[2], ENT_COMPAT);
return '<img src="' . $matches[1] . '" alt="' . $matches[2] . '">';
return '<img src="' . $matches[1] . '" alt="' . $matches[2] . '" title="' . $matches[2] . '">';
},
$text);