Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't generate HTML by hand (rails_xss/3.0 compatibility).

  • Loading branch information...
commit 0508960f245b905e37e4d39e242c857d909b2ca8 1 parent 624f737
@chrisboyle chrisboyle authored committed
Showing with 1 addition and 2 deletions.
  1. +1 −2  lib/auto_sprite.rb
View
3  lib/auto_sprite.rb
@@ -65,9 +65,8 @@ def self.included(base)
base.class_eval do
def image_tag(source, options = {})
src = path_to_image(source)
- title = (options[:title].nil? or options[:title].empty?) ? "" : "title='#{options[:title]}'"
if src =~ /\/images\/sprites/
- "<span #{title} class='#{AutoSprite.generate_css_name(src)}'></span>"
+ content_tag :span, '', options.merge(:class => AutoSprite.generate_css_name(src))
else
super(source,options)
end
Please sign in to comment.
Something went wrong with that request. Please try again.