lib/redcloth/formatters/html.rb in RedCloth-4.3.1 vs lib/redcloth/formatters/html.rb in RedCloth-4.3.2

- old
+ new

@@ -109,18 +109,18 @@ def bq_close(opts) "</blockquote>\n" end def link(opts) - if (filter_html || sanitize_html) && opts[:href] =~ /^\s*javascript:/ + if (filter_html || sanitize_html) && opts[:href] =~ /^\s*javascript:/i opts[:name] else "<a href=\"#{escape_attribute opts[:href]}\"#{pba(opts)}>#{opts[:name]}</a>" end end def image(opts) - if (filter_html || sanitize_html) && ( opts[:src] =~ /^\s*javascript:/ || opts[:href] =~ /^\s*javascript:/ ) + if (filter_html || sanitize_html) && ( opts[:src] =~ /^\s*javascript:/i || opts[:href] =~ /^\s*javascript:/i ) opts[:title] else opts.delete(:align) opts[:alt] = opts[:title] img = "<img src=\"#{escape_attribute opts[:src]}\"#{pba(opts)} alt=\"#{escape_attribute opts[:alt].to_s}\" />"