diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-24 05:47:21 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-24 05:47:21 -0800 |
commit | f5b9aefb574bf3cf1d3779606e54bd0a0a73d2aa (patch) | |
tree | da7a9a4d9cd8ad05648bde5d283715d5feea4d81 /actionpack/lib/action_view/helpers/javascript_helper.rb | |
parent | a5fa310f406e299a1ac54d1a227bde93b7ce282b (diff) | |
parent | 5ca86ac8f924b333a5a01a47cc07cbcf39c16e80 (diff) | |
download | rails-f5b9aefb574bf3cf1d3779606e54bd0a0a73d2aa.tar.gz rails-f5b9aefb574bf3cf1d3779606e54bd0a0a73d2aa.tar.bz2 rails-f5b9aefb574bf3cf1d3779606e54bd0a0a73d2aa.zip |
Merge pull request #4160 from lest/deprecate-encoding-aware
deprecate String#encoding_aware? and remove its usage
Diffstat (limited to 'actionpack/lib/action_view/helpers/javascript_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/javascript_helper.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 842f4c23a3..309923490c 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -14,11 +14,7 @@ module ActionView "'" => "\\'" } - if "ruby".encoding_aware? - JS_ESCAPE_MAP["\342\200\250".force_encoding('UTF-8').encode!] = '
' - else - JS_ESCAPE_MAP["\342\200\250"] = '
' - end + JS_ESCAPE_MAP["\342\200\250".force_encoding('UTF-8').encode!] = '
' # Escapes carriage returns and single and double quotes for JavaScript segments. # |