fix #1104 together with previous commit (thanks 02strich) to escape single quotes in i18n strings

This commit is contained in:
Reinier Balt 2011-02-12 22:58:58 +01:00
parent 0207b3b949
commit e278e3d5ce

View file

@ -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