Browse code

Fixes img tag properties

Frederic Hemberger authored on 26/09/2011 at 13:58:14
Showing 1 changed files
... ...
@@ -30,9 +30,9 @@ module Jekyll
30 30
           @img['title']  = title
31 31
           @img['alt']    = alt
32 32
         else
33
-          @img['alt']    = @img['title'].gsub!(/"/, '"')
33
+          @img['alt']    = @img['title'].gsub!(/"/, '"') if @img['title']
34 34
         end
35
-        @img['class'].gsub!(/"/, '')
35
+        @img['class'].gsub!(/"/, '') if @img['class']
36 36
       end
37 37
       super
38 38
     end