Fixed Parsedown being a piece of garbage.

This commit is contained in:
flash 2019-01-03 03:02:43 +01:00
parent 782380f51f
commit 751e296451

View file

@ -18,7 +18,11 @@ class MarkdownParser extends Parsedown implements ParserInterface
protected function inlineImage($excerpt)
{
$object = parent::inlineImage($excerpt);
$object['element']['attributes']['src'] = proxy_media_url($object['element']['attributes']['src']);
if (!empty($object['element']['attributes']['src']) && !is_local_url($object['element']['attributes']['src'])) {
$object['element']['attributes']['src'] = proxy_media_url($object['element']['attributes']['src']);
}
return $object;
}
}