diff --git a/Parsedown.php b/Parsedown.php index 3d12d81..0ed6b13 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -1305,14 +1305,12 @@ class Parsedown $Inline['extent'] ++; - $Inline['element'] = array( - 'name' => 'img', - 'attributes' => array( - 'src' => $Inline['element']['attributes']['href'], - 'alt' => $Inline['element']['text'], - 'title' => $Inline['element']['attributes']['title'], - ), - ); + $Inline['element']['name'] = 'img'; + $Inline['element']['attributes']['src'] = $Inline['element']['attributes']['href']; + unset($Inline['element']['attributes']['href']); + + $Inline['element']['attributes']['alt'] = $Inline['element']['text']; + unset($Inline['element']['text']); return $Inline; }