aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string/output_safety.rb
diff options
context:
space:
mode:
authorKalys Osmonov <kalys@osmonov.com>2012-09-03 15:42:24 +0600
committerKalys Osmonov <kalys@osmonov.com>2012-09-09 19:48:32 +0600
commit6b2a24c3bd7ed75326dec50decf6018b3685f113 (patch)
tree3ff4a50c810aaf59fb2d213ead6ad511c41dcfa1 /activesupport/lib/active_support/core_ext/string/output_safety.rb
parent5d264f229c3798367e445d1ca02f3910ad9db547 (diff)
downloadrails-6b2a24c3bd7ed75326dec50decf6018b3685f113.tar.gz
rails-6b2a24c3bd7ed75326dec50decf6018b3685f113.tar.bz2
rails-6b2a24c3bd7ed75326dec50decf6018b3685f113.zip
&#39 dates back to SGML when &#x27 was introduced in HTML 4.0
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/output_safety.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/string/output_safety.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb
index dad4b29d46..999b715981 100644
--- a/activesupport/lib/active_support/core_ext/string/output_safety.rb
+++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -3,7 +3,7 @@ require 'active_support/core_ext/kernel/singleton_class'
class ERB
module Util
- HTML_ESCAPE = { '&' => '&amp;', '>' => '&gt;', '<' => '&lt;', '"' => '&quot;', "'" => '&#x27;' }
+ HTML_ESCAPE = { '&' => '&amp;', '>' => '&gt;', '<' => '&lt;', '"' => '&quot;', "'" => '&#39;' }
JSON_ESCAPE = { '&' => '\u0026', '>' => '\u003E', '<' => '\u003C' }
HTML_ESCAPE_ONCE_REGEXP = /["><']|&(?!([a-zA-Z]+|(#\d+));)/
JSON_ESCAPE_REGEXP = /[&"><]/