diff options
author | Erik St. Martin <alakriti@gmail.com> | 2010-01-26 11:59:19 -0500 |
---|---|---|
committer | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 12:44:35 -0600 |
commit | a6cd35ba68c6d210f097a37ff737bbc1e5c61972 (patch) | |
tree | acc44cc849d708fc528bb81ee236fc12adf51516 | |
parent | 007db3fca8be4f22ede5d4d94e8dc7e3cb34d240 (diff) | |
download | rails-a6cd35ba68c6d210f097a37ff737bbc1e5c61972.tar.gz rails-a6cd35ba68c6d210f097a37ff737bbc1e5c61972.tar.bz2 rails-a6cd35ba68c6d210f097a37ff737bbc1e5c61972.zip |
moving html_safe call into helpers directly as they only work from that level
-rw-r--r-- | actionpack/lib/action_view/helpers/ajax_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 8d09ca1187..5b706ba942 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -405,7 +405,7 @@ module ActionView # periodically_call_remote does not need data-observe=true attributes.delete('data-observe') - script_decorator(attributes) + script_decorator(attributes).html_safe! end # Observes the field with the DOM ID specified by +field_id+ and calls a @@ -484,7 +484,7 @@ module ActionView attributes = extract_observer_attributes!(options) attributes.merge!(html_options) if html_options - script_decorator(attributes) + script_decorator(attributes).html_safe! end # Observes the form with the DOM ID specified by +form_id+ and calls a @@ -499,13 +499,13 @@ module ActionView options[:observed] = name attributes = extract_observer_attributes!(options) - script_decorator(attributes) + script_decorator(attributes).html_safe! end def script_decorator(options) attributes = %w(type="application/json") attributes += options.map{|k, v| k + '="' + v.to_s + '"'} - "<script " + attributes.join(" ") + "></script>".html_safe! + "<script " + attributes.join(" ") + "></script>" end private |