예를 탈출 내가 레일 콘솔에서이 일을하고있다 :루비/레일 넷 :: HTTP.post_form 중첩 된 해시 항목 HTML을
Started POST "/download.pdf" for 127.0.0.1 at 2013-04-15 16:25:36 +0200
Processing by PublicController#show_pdf as */*
Parameters: {"type"=>"raka", "fields"=>"t4", "railing"=>"A-3", "wood"=>"wood_6
", "railing_m"=>"0", "order"=>"{\"sving\"=>\"right\", \"size\"=>{\"ground\"=>\"1
23\", \"floor\"=>\"6\", \"a\"=>\"6\", \"d\"=>\"6\"}, \"comments\"=>{\"step_2\"=>
\"\", \"step_3\"=>\"\", \"step_4\"=>\"\"}, \"railing\"=>{\"1\"=>\"1\", \"2\"=>\"
1\"}, \"railing_m\"=>{\"1\"=>\"\", \"2\"=>\"\", \"3\"=>\"\", \"4\"=>\"12\"}, \"h
ul\"=>{\"l\"=>\"123\", \"b\"=>\"123\"}, \"name\"=>\"qwed\", \"email\"=>\"[email protected]\", \"phone\"=>\"13123\", \"street\"=>\"iuuj\", \"city\"=>\"ui\", \"postn
r\"=>\"213\"}"}
:
params = {"type"=>["raka"], "fields"=>["exhb_0", "exh0_1", "t_g_a", "hp_1", "s1", "overflade_0", "t2", "t3", "t4"], "railing"=>["A-3"], "wood"=>["wood_6"], "railing_m"=>"0", "order"=>{"sving"=>"right", "size"=>{"ground"=>"123", "floor"=>"6", "a"=>"6", "d"=>"6"}, "comments"=>{"step_2"=>"", "step_3"=>"", "step_4"=>""}, "railing"=>{"1"=>"1", "2"=>"1"}, "railing_m"=>{"1"=>"", "2"=>"", "3"=>"", "4"=>"12"}, "hul"=>{"l"=>"123", "b"=>"123"}, "name"=>"qwed", "email"=>"[email protected]", "phone"=>"13123", "street"=>"iuuj", "city"=>"ui", "postnr"=>"213"}}
x = Net::HTTP.post_form(URI.parse('http://localhost:3000/download.pdf'), params)
을 내 레일 콘솔에서 나는 HTTP POST 요청을 볼 수 있습니다
중첩 된 http 매개 변수는 모두 HTML 이스케이프 처리됩니다. 어떻게 제거 할 수 있습니까?
문제를 설명해주십시오. 중첩 된 매개 변수를 이스케이프 처리하는 것이 문제가되는 경우 어떤 문제가 발생합니까? 또는 간단히 말하면, 왜 당신은 탈출을 제거하고 싶습니까? –
문제는 중첩 된 매개 변수가 HTML로 이스케이프 처리된다는 것입니다. –
그래서? 그것은 어쨌든 프로그램 논리에 영향을 미치나요? –