From fdf6af1d25ddc991c96dc3b4df5f7e913adcd7ef Mon Sep 17 00:00:00 2001
From: Frederic Hemberger <mail@frederic-hemberger.de>
Date: Mon, 26 Sep 2011 15:58:14 +0200
Subject: Fixes img tag properties

---
 plugins/image_tag.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'plugins')

diff --git a/plugins/image_tag.rb b/plugins/image_tag.rb
index 20595cb9..45670007 100644
--- a/plugins/image_tag.rb
+++ b/plugins/image_tag.rb
@@ -30,9 +30,9 @@ module Jekyll
           @img['title']  = title
           @img['alt']    = alt
         else
-          @img['alt']    = @img['title'].gsub!(/"/, '&#34;')
+          @img['alt']    = @img['title'].gsub!(/"/, '&#34;') if @img['title']
         end
-        @img['class'].gsub!(/"/, '')
+        @img['class'].gsub!(/"/, '') if @img['class']
       end
       super
     end
-- 
cgit v1.2.1