@converted to% 40 in GET

I am using http://jquery.malsup.com/form/ and I am sending the email to the URL using GET.

It looks like the @ in the email address is converted to% 40.

Will this be a problem for the data collection site?

+4
source share
1 answer

%40 is the URL @ encoded version. This conversion occurs only in the URL. The server will still look like @ , and if necessary, you can even use JavaScript to decode it:

 decodeURIComponent('%40'); // '@' // or, to encode it back: encodeURIComponent('@'); // '%40' 

Here is an example URL that will be treated as expected on the server side:

 http://mathiasbynens.be/demo/get?x=%40 

If you go to the page , you will see that it prints @ , not %40 .

Here is an example URL that will be treated as expected on the client side using decodeURIComponent :

 http://mothereff.in/byte-counter#%40 

If you go to the page , you will see that the content of the text field is set to @ , not %40 .

+14
source

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


All Articles