]> source.dussan.org Git - redmine.git/commitdiff
Rails3: use String#html_safe for javascript_heads() at ApplicationHelper.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 20 Aug 2011 22:53:24 +0000 (22:53 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 20 Aug 2011 22:53:24 +0000 (22:53 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6494 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb

index 939bd35690e3bec7bb409e6a5952405be40f1a58..ebcb1bc1dbcf0472bc2375261b6e7a735b842a0f 100644 (file)
@@ -917,7 +917,7 @@ module ApplicationHelper
   def javascript_heads
     tags = javascript_include_tag(:defaults)
     unless User.current.pref.warn_on_leaving_unsaved == '0'
-      tags << "\n" + javascript_tag("Event.observe(window, 'load', function(){ new WarnLeavingUnsaved('#{escape_javascript( l(:text_warn_on_leaving_unsaved) )}'); });")
+      tags << "\n".html_safe + javascript_tag("Event.observe(window, 'load', function(){ new WarnLeavingUnsaved('#{escape_javascript( l(:text_warn_on_leaving_unsaved) )}'); });")
     end
     tags
   end