diff --git a/monstra/helpers/html.php b/monstra/helpers/html.php index 04c84d6..9796d5c 100644 --- a/monstra/helpers/html.php +++ b/monstra/helpers/html.php @@ -221,14 +221,14 @@ */ public static function doctype($type = 'html5') { - $doctypes = array('xhtml11' => '', - 'xhtml1-strict' => '', - 'xhtml1-trans' => '', - 'xhtml1-frame' => '', - 'html5' => '', - 'html4-strict' => '', - 'html4-trans' => '', - 'html4-frame' => ''); + $doctypes = array('xhtml11' => '', + 'xhtml1-strict' => '', + 'xhtml1-trans' => '', + 'xhtml1-frame' => '', + 'html5' => '', + 'html4-strict' => '', + 'html4-trans' => '', + 'html4-frame' => ''); if (isset($doctypes[$type])) return $doctypes[$type]; else return false; @@ -252,9 +252,10 @@ if (strpos($file, '://') === FALSE) { $file = Url::base().'/'.$file; } - + // Add the image link $attributes['src'] = $file; + $attributes['alt'] = (isset($attributes['alt'])) ? $attributes['alt'] : pathinfo($file, PATHINFO_FILENAME); return ''; }