Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

CGI unescape the POST data

  • Loading branch information...
commit ac77b0123076071e6e529dfccf6ecdd83d668e8d 1 parent 3d58c9a
@brynary authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/highcharts_server.rb
View
2  lib/highcharts_server.rb
@@ -11,7 +11,7 @@ def self.root
class Server < Sinatra::Base
post "/charts" do
- chart_options = JSON.parse(request.env["rack.input"].read)
+ chart_options = JSON.parse(CGI.unescape(request.env["rack.input"].read))
hash = Digest::MD5.hexdigest(chart_options.to_json)
image_path = HighchartsServer.root.join("tmp", "charts-#{hash}-#{Time.now.to_i}-#{$$}.png").to_s
cuty_capt = CutyCapt.new(chart_options)
Please sign in to comment.
Something went wrong with that request. Please try again.