HTML: prevent URL encoding of the POST form

I have an HTML form that needs to be sent to a url. I would like the POST form to change one variable called DATA:

DATA: somevar=someval&somevar2=someotherval

I have problems with this. Apparently, the default form is urlencode data, resulting in:

DATA: somevar%3Dsomeval%26somevar2%3Dsomeotherval

Changing the enc-type form to "text / plain" results in:

DATA: somevar=someval
SOMEVAR2: someotherval

Is there a way that I can have the form just submit the data as above?

+3
source share
3 answers

No, you cannot do what you are trying to do. And you probably shouldn't try. The fact that you want some data inside the DATA variable to mean that your POST payload (or your GET request string) will look like

DATA=somevar%3Dsomeval%26somevar2%3Dsomeotherval

( , ),

DATA=somevar=someval&somevar2=someotherval

:

DATA 'somevar = someval'

somevar2 "someotherval"

, VARIABLE_NAME = VALUE, "&".

( firebug chrome). , : ? , .

:

+1

, , URL- POST .

, , URL- 100% ,

enctype="text/plain"

.

enctype/plain .

LMint-PC droope # nc -kl 80
POST / HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 168

%7B%22JobTypeIdentifier%22%3A3%2C%22ScheduledStart%22%3Anull%2C%22ScheduleType%22%3A%22Recurring%22%2C%22JobInputP
meters%22%3A%5B%5D%2C%22ignoreParam%22%3A%22=%22%7D^C
LMint-PC droope # ^C
LMint-PC droope # nc -kl 80
POST / HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: text/plain
Content-Length: 116

{"JobTypeIdentifier":3,"ScheduledStart":null,"ScheduleType":"Recurring","JobInputParameters":[],"ignoreParam":"="}
+5

try HTTP BUILD QUERY

Update

if you use form submission in php try below function to decode back

html-entity-decode

0
source

Source: https://habr.com/ru/post/1794676/


All Articles