From 5ca86ac8f924b333a5a01a47cc07cbcf39c16e80 Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Sat, 24 Dec 2011 15:57:54 +0300 Subject: deprecate String#encoding_aware? and remove its usage --- actionpack/lib/action_view/helpers/javascript_helper.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'actionpack/lib/action_view/helpers') 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. # -- cgit v1.2.3