aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-09-17 21:31:57 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-09-17 21:31:57 +0000
commit6b68b215c2eee237248dcebbbe2c9258ebd8ca57 (patch)
tree43371fb01a91b2db164a9c8cb6518dff88a898f6 /activesupport/lib/active_support
parent81d619ea0d7e936bdf5a643c8731e4b3f3746b8e (diff)
downloadrails-6b68b215c2eee237248dcebbbe2c9258ebd8ca57.tar.gz
rails-6b68b215c2eee237248dcebbbe2c9258ebd8ca57.tar.bz2
rails-6b68b215c2eee237248dcebbbe2c9258ebd8ca57.zip
Hash#to_xml doesn't double-unescape. Closes #8806.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7505 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/core_ext/hash/conversions.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb
index d8c6852e25..97b4301bdd 100644
--- a/activesupport/lib/active_support/core_ext/hash/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb
@@ -169,7 +169,7 @@ module ActiveSupport #:nodoc:
case value.class.to_s
when 'Hash'
if value.has_key?("__content__")
- content = translate_xml_entities(value["__content__"])
+ content = value["__content__"]
if parser = XML_PARSING[value["type"]]
if parser.arity == 2
XML_PARSING[value["type"]].call(content, value)
@@ -226,14 +226,6 @@ module ActiveSupport #:nodoc:
end
end
- def translate_xml_entities(value)
- value.gsub(/&lt;/, "<").
- gsub(/&gt;/, ">").
- gsub(/&quot;/, '"').
- gsub(/&apos;/, "'").
- gsub(/&amp;/, "&")
- end
-
def undasherize_keys(params)
case params.class.to_s
when "Hash"