Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding CGI::escapeHTML to a couple more locations.

  • Loading branch information...
commit b4ef31df3f0e2d2e98ab704dbcf0fa9af017dc30 1 parent 02ca78f
@nealpoole nealpoole authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  app/app.rb
  2. +1 −1  app/helpers/pretty_printing.rb
View
2  app/app.rb
@@ -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
View
2  app/helpers/pretty_printing.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.