From c13a3f0fc18eec15441e6d88073b92850e93d59a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 14 May 2012 08:02:45 +0200 Subject: [PATCH] Since escape_html_entities_in_json was moved to 3-2-stable, make it true in AS, closes #6287 --- activesupport/lib/active_support/json/encoding.rb | 2 +- .../rails/generators/rails/app/templates/config/application.rb | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb index ab12f3f454..a6e4e7ced2 100644 --- a/activesupport/lib/active_support/json/encoding.rb +++ b/activesupport/lib/active_support/json/encoding.rb @@ -136,7 +136,7 @@ module ActiveSupport end self.use_standard_json_time_format = true - self.escape_html_entities_in_json = false + self.escape_html_entities_in_json = true self.encode_big_decimal_as_string = true end end diff --git a/railties/lib/rails/generators/rails/app/templates/config/application.rb b/railties/lib/rails/generators/rails/app/templates/config/application.rb index 5fa96397f0..d816f973e6 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/application.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb @@ -44,9 +44,6 @@ module <%= app_const_base %> # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] - # Enable escaping HTML in JSON. The default is false. - # config.active_support.escape_html_entities_in_json = true - # Use SQL instead of Active Record's schema dumper when creating the database. # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types.