marks javascript_heads as html_safe

pull/1186/head
Jens Ulferts 12 years ago committed by Martin Czuchra
parent 09cd82f51e
commit 6927a6db8a
  1. 4
      app/helpers/application_helper.rb

@ -1033,9 +1033,9 @@ 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.safe_concat "\n" + javascript_tag("Event.observe(window, 'load', function(){ new WarnLeavingUnsaved('#{escape_javascript( l(:text_warn_on_leaving_unsaved) )}'); });")
end
tags << "\n" + javascript_include_tag("accessibility.js") if User.current.impaired? and accessibility_js_enabled?
tags.safe_concat("\n" + javascript_include_tag("accessibility.js")) if User.current.impaired? and accessibility_js_enabled?
tags
end

Loading…
Cancel
Save