Skip to content

Commit

Permalink
Fix escape_html
Browse files Browse the repository at this point in the history
  • Loading branch information
ericproulx committed Jan 21, 2024
1 parent dc837a7 commit ac6c7a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/grape/dsl/inside_route.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def error!(message, status = nil, additional_headers = nil)
#
def rack_response(message, status = 200, headers = { Rack::CONTENT_TYPE => content_type })
Grape.deprecator.warn('Use error! instead of rack_response')
message = Rack::Utils::escape_html(message) if headers[Rack::CONTENT_TYPE] == 'text/html'
message = Rack::Utils.escape_html(message) if headers[Rack::CONTENT_TYPE] == 'text/html'
Rack::Response.new(Array.wrap(message), Rack::Utils.status_code(status), headers)
end

Expand Down

0 comments on commit ac6c7a3

Please sign in to comment.