aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2010-01-08 13:45:51 -0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2010-01-08 13:46:30 -0800
commitd4589e96ef5a2adaa81dac09869eefdadb24d6ee (patch)
treeb122de67abc94178db713367f5471dc7933ddc3c
parent652d1c19ea077fb0af70379181bd4629e08944b6 (diff)
downloadrails-d4589e96ef5a2adaa81dac09869eefdadb24d6ee.tar.gz
rails-d4589e96ef5a2adaa81dac09869eefdadb24d6ee.tar.bz2
rails-d4589e96ef5a2adaa81dac09869eefdadb24d6ee.zip
Fixed that PrototypeHelper#update_page should return html_safe [DHH]
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_view/helpers/prototype_helper.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 878f9df6eb..014a501080 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*Edge*
+* Fixed that PrototypeHelper#update_page should return html_safe [DHH]
+
* Fixed that much of DateHelper wouldn't return html_safe? strings [DHH]
* Fixed that fragment caching should return a cache hit as html_safe (or it would all just get escaped) [DHH]
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb
index 8c1f0ad81f..ff7bc3b34e 100644
--- a/actionpack/lib/action_view/helpers/prototype_helper.rb
+++ b/actionpack/lib/action_view/helpers/prototype_helper.rb
@@ -1030,7 +1030,7 @@ module ActionView
# page.hide 'spinner'
# end
def update_page(&block)
- JavaScriptGenerator.new(@template, &block).to_s
+ JavaScriptGenerator.new(@template, &block).to_s.html_safe!
end
# Works like update_page but wraps the generated JavaScript in a <script>