Permalink
Browse files

Adding CGI::escapeHTML to a couple more locations.

  • Loading branch information...
1 parent 02ca78f commit b4ef31df3f0e2d2e98ab704dbcf0fa9af017dc30 @nealpoole nealpoole committed Jan 8, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 app/app.rb
  2. +1 −1 app/helpers/pretty_printing.rb
View
@@ -179,7 +179,7 @@ def initialize(*args)
:prev_hurl => @user ? @user.second_to_last_hurl_id : nil,
:view_id => save_view(header, body, request)
rescue => e
- json :error => e.to_s
+ json :error => CGI::escapeHTML(e.to_s)
end
end
@@ -14,7 +14,7 @@ def pretty_print(type, content)
elsif type.include? 'html'
colorize :html => content
else
- content.inspect
+ CGI::escapeHTML(content.inspect)
end
end

0 comments on commit b4ef31d

Please sign in to comment.