diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 07eaa91ca..5b98c20c1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -25,7 +25,10 @@ module ApplicationHelper def escape_unicode(javascript) if javascript - javascript.gsub(/\342\200\250/u, '
').gsub(/(<\/)/u, '\u003C/').html_safe + javascript = javascript.dup.force_encoding("utf-8") + javascript.gsub!(/\342\200\250/u, '
') + javascript.gsub!(/(<\/)/u, '\u003C/') + javascript.html_safe else '' end