From 9afa27bf59e8c8bb5e89a4cf0566685a2d4dbd7b Mon Sep 17 00:00:00 2001 From: Jethro Yu Date: Fri, 8 May 2015 17:30:59 +0800 Subject: [PATCH] URI escape stylesheet_link --- app/helpers/application_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 916bdf1..7e2095a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1206,6 +1206,7 @@ module ApplicationHelper # stylesheet_link_tag('styles', :plugin => 'foo) # => picks styles.css from plugin's assets # def stylesheet_link_tag(*sources) + require 'uri' options = sources.last.is_a?(Hash) ? sources.pop : {} plugin = options.delete(:plugin) sources = sources.map do |source| @@ -1217,7 +1218,7 @@ module ApplicationHelper source end end - super sources, options + super sources.map { |source| (source.is_a? String) ? URI.escape(source) : source }, options end # Overrides Rails' image_tag with themes and plugins support. -- 1.9.1