aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2010-01-16 21:43:03 -0600
committerJoshua Peek <josh@joshpeek.com>2010-01-16 21:43:03 -0600
commitf9a4300415a320e1cb01fb3806fbd3637df38183 (patch)
treecc3aa36970326a39f7025c7feac85e080f1e8d9f
parenteb39d0f7b999f09c4e13f035634887a8f5592443 (diff)
downloadrails-f9a4300415a320e1cb01fb3806fbd3637df38183.tar.gz
rails-f9a4300415a320e1cb01fb3806fbd3637df38183.tar.bz2
rails-f9a4300415a320e1cb01fb3806fbd3637df38183.zip
debug helper output should not be sanitized
-rw-r--r--actionpack/lib/action_view/helpers/debug_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/debug_helper.rb b/actionpack/lib/action_view/helpers/debug_helper.rb
index 90863fca08..885945fde3 100644
--- a/actionpack/lib/action_view/helpers/debug_helper.rb
+++ b/actionpack/lib/action_view/helpers/debug_helper.rb
@@ -27,10 +27,10 @@ module ActionView
def debug(object)
begin
Marshal::dump(object)
- "<pre class='debug_dump'>#{h(object.to_yaml).gsub(" ", "&nbsp; ")}</pre>"
+ "<pre class='debug_dump'>#{h(object.to_yaml).gsub(" ", "&nbsp; ")}</pre>".html_safe!
rescue Exception => e # errors from Marshal or YAML
# Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback
- "<code class='debug_dump'>#{h(object.inspect)}</code>"
+ "<code class='debug_dump'>#{h(object.inspect)}</code>".html_safe!
end
end
end