aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-09-08 15:38:51 -0300
committerEmilio Tagua <miloops@gmail.com>2009-09-08 15:38:51 -0300
commit670281c6b2e9b9e8c51a140f2a5f66b251f1b84b (patch)
treeab141872d72e010c8a0fe371d22a00914c97e1eb /actionpack/lib/action_view/helpers
parent39e4e76d15233bb1cb0b778d920f54efe86bb4f0 (diff)
parent1a0f822037c408a392ffa7b6e1ecbe5951ab48db (diff)
downloadrails-670281c6b2e9b9e8c51a140f2a5f66b251f1b84b.tar.gz
rails-670281c6b2e9b9e8c51a140f2a5f66b251f1b84b.tar.bz2
rails-670281c6b2e9b9e8c51a140f2a5f66b251f1b84b.zip
Merge commit 'rails/master'
Conflicts: activerecord/lib/active_record/associations.rb
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb8
-rw-r--r--actionpack/lib/action_view/helpers/tag_helper.rb2
2 files changed, 7 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index c71840d41f..6b00e7afb5 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -286,7 +286,9 @@ module ActionView
end
javascript_src_tag(joined_javascript_name, options)
else
- ensure_javascript_sources!(expand_javascript_sources(sources, recursive)).collect { |source| javascript_src_tag(source, options) }.join("\n")
+ sources = expand_javascript_sources(sources, recursive)
+ ensure_javascript_sources!(sources) if cache
+ sources.collect { |source| javascript_src_tag(source, options) }.join("\n")
end
end
@@ -435,7 +437,9 @@ module ActionView
end
stylesheet_tag(joined_stylesheet_name, options)
else
- ensure_stylesheet_sources!(expand_stylesheet_sources(sources, recursive)).collect { |source| stylesheet_tag(source, options) }.join("\n")
+ sources = expand_stylesheet_sources(sources, recursive)
+ ensure_stylesheet_sources!(sources) if cache
+ sources.collect { |source| stylesheet_tag(source, options) }.join("\n")
end
end
diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb
index ff5a2134ff..7fae0f6b8d 100644
--- a/actionpack/lib/action_view/helpers/tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/tag_helper.rb
@@ -106,7 +106,7 @@ module ActionView
# escape_once("&lt;&lt; Accept & Checkout")
# # => "&lt;&lt; Accept &amp; Checkout"
def escape_once(html)
- html.to_s.gsub(/[\"><]|&(?!([a-zA-Z]+|(#\d+));)/) { |special| ERB::Util::HTML_ESCAPE[special] }
+ ActiveSupport::Multibyte.clean(html.to_s).gsub(/[\"><]|&(?!([a-zA-Z]+|(#\d+));)/) { |special| ERB::Util::HTML_ESCAPE[special] }
end
private