0001-URI-escape-stylesheet_link.patch

Jethro Yu, 2015-05-08 12:00

Download (1.09 KB)

View differences:

app/helpers/application_helper.rb
1206 1206
  #   stylesheet_link_tag('styles', :plugin => 'foo) # => picks styles.css from plugin's assets
1207 1207
  #
1208 1208
  def stylesheet_link_tag(*sources)
1209
    require 'uri'
1209 1210
    options = sources.last.is_a?(Hash) ? sources.pop : {}
1210 1211
    plugin = options.delete(:plugin)
1211 1212
    sources = sources.map do |source|
......
1217 1218
        source
1218 1219
      end
1219 1220
    end
1220
    super sources, options
1221
    super sources.map { |source| (source.is_a? String) ? URI.escape(source) : source }, options
1221 1222
  end
1222 1223

  
1223 1224
  # Overrides Rails' image_tag with themes and plugins support.
1224
-