Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is url encoding %2526?

Why is %2526 used instead of %26 to encode an &?

Im invoking a URL to an external site and when I encode the & as %2526 the parameters are passed correctly but when I just use %26 they are not.

like image 667
blue-sky Avatar asked Feb 15 '12 11:02

blue-sky


People also ask

What is URL encoding used for?

URL Encoding (Percent Encoding) URL encoding converts characters into a format that can be transmitted over the Internet. URLs can only be sent over the Internet using the ASCII character-set. Since URLs often contain characters outside the ASCII set, the URL has to be converted into a valid ASCII format.

What does %3D mean in URL?

is a reserved separator character that cannot appear unencoded in the name and value fields, it must be url-encoded as %3D : custom_field_id%5B%5D%3D10=custom_field_value_10%3DFull-time. It is the receiver's responsibility to url-decode the submitted data before then processing it.

What is URL 20 encoding?

A space is assigned number 32, which is 20 in hexadecimal. When you see “%20,” it represents a space in an encoded URL, for example, http://www.example.com/products%20and%20services.html.


2 Answers

If you url-encode an ampersand you get %26. If you url-encode %26 you get %2526. Thus, it is url-encoded twice.

like image 119
Sjoerd Avatar answered Oct 11 '22 18:10

Sjoerd


%25 is the percent character, so %2526 URLDecoded results in

%26

which URLDecoded results in

&

For some reason, the call you make seems to require doubly percent encoded input. Without knowing more about what you're doing, it's impossible to know why, but I guess all is in order.

like image 44
Pekka Avatar answered Oct 11 '22 18:10

Pekka