From e278e3d5ce39c0f8ce9a4483a683da6135c19df7 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Sat, 12 Feb 2011 22:58:58 +0100 Subject: [PATCH] fix #1104 together with previous commit (thanks 02strich) to escape single quotes in i18n strings --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9dc81e82..0f6fa52c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -254,7 +254,7 @@ module ApplicationHelper common.cancel common.ok common.ajaxError }.each do |s| - js << "i18n['#{s}'] = '#{t(s)}';\n" + js << "i18n['#{s}'] = '#{ t(s).gsub(/'/, "\\\\'") }';\n" end return js end