Permalink
Browse files

debug helper output should not be sanitized

  • Loading branch information...
josh committed Jan 17, 2010
1 parent eb39d0f commit f9a4300415a320e1cb01fb3806fbd3637df38183
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_view/helpers/debug_helper.rb
@@ -27,10 +27,10 @@ module DebugHelper
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

0 comments on commit f9a4300

Please sign in to comment.