After testing, the python urllib library and js encodeURIComponent will not be replaced. The space encode is also replaced with '% 20 '. Python provides urllib. quote_plus and urlib. unquote_plus to handle Space-> plus signs, which looks reasonable.
Check RFC 3986.
Scheme names consist of a sequence of characters beginning with a letter and followed by any combination of letters, digits, plus ("+"), period (". "), or hyphen ("-").
RFC 2396 has the following section
The plus "+", dollar "$", and comma "," characters have been added to those in the "reserved" set, since they are treated as reserved within the query component.
It indicates that the plus sign is a reserved word of the url and does not need to be escaped.
Then there is an escape for the plus sign in the html4 document:
Application/x-www-form-urlencoded
Forms submitted with this content type must be encoded as follows:
Control names and values are escaped. Space characters are replaced by '+', and then reserved characters .....
It is declared that only content-type is application/x-www-form-urlencoded will escape +.
I flipped through the php document and found
Rawurlencode ()-URL-encode according to RFC 3986.
That is, php implements rawurlencode and rawurldecode to implement the standard ....
Can't it be reversed? After all, most people should use urlencode. Php really hurts ....