aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorSantiago Pastorino and José Ignacio Costa <santiago+jose@wyeworks.com>2010-02-14 01:46:02 -0200
committerYehuda Katz <yehudakatz@YK.local>2010-02-14 12:03:39 -0800
commit98a5bf8ff219f796e6db2d8d8b21dd114be47965 (patch)
tree4fae1695920951fc949dc0666ce589909e43c05b /actionpack/lib
parent9f1900ec7a8a27e1a0eeef93e1226c09a79666b5 (diff)
downloadrails-98a5bf8ff219f796e6db2d8d8b21dd114be47965.tar.gz
rails-98a5bf8ff219f796e6db2d8d8b21dd114be47965.tar.bz2
rails-98a5bf8ff219f796e6db2d8d8b21dd114be47965.zip
Explicit html_escape removed when not needed
Signed-off-by: Yehuda Katz <yehudakatz@YK.local>
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/active_model_helper.rb4
-rw-r--r--actionpack/lib/action_view/helpers/tag_helper.rb2
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/active_model_helper.rb b/actionpack/lib/action_view/helpers/active_model_helper.rb
index c87e216c32..2f309fcca0 100644
--- a/actionpack/lib/action_view/helpers/active_model_helper.rb
+++ b/actionpack/lib/action_view/helpers/active_model_helper.rb
@@ -127,7 +127,7 @@ module ActionView
if (obj = (object.respond_to?(:errors) ? object : instance_variable_get("@#{object}"))) &&
(errors = obj.errors[method])
content_tag("div",
- "#{options[:prepend_text]}#{ERB::Util.html_escape(errors.first)}#{options[:append_text]}".html_safe,
+ (options[:prepend_text].html_safe << errors.first).safe_concat(options[:append_text]),
:class => options[:css_class]
)
else
@@ -226,7 +226,7 @@ module ActionView
error_messages = objects.sum do |object|
object.errors.full_messages.map do |msg|
- content_tag(:li, ERB::Util.html_escape(msg))
+ content_tag(:li, msg)
end
end.join.html_safe
diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb
index 1c3eb20e19..513d72880c 100644
--- a/actionpack/lib/action_view/helpers/tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/tag_helper.rb
@@ -127,7 +127,7 @@ module ActionView
def content_tag_string(name, content, options, escape = true)
tag_options = tag_options(options, escape) if options
- "<#{name}#{tag_options}>#{ERB::Util.h content}</#{name}>".html_safe
+ ("<#{name}#{tag_options}>".html_safe << content.to_s).safe_concat("</#{name}>")
end
def tag_options(options, escape = true)
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index 4690161497..04a2743b9c 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -226,7 +226,7 @@ module ActionView
end
href_attr = "href=\"#{url}\"" unless href
- "<a #{href_attr}#{tag_options}>#{ERB::Util.h(name || url)}</a>".html_safe
+ ("<a #{href_attr}#{tag_options}>".html_safe << (name || url)).safe_concat("</a>")
end
end