URLs appear with A +, space,/,?,%,#,&,= and other special symbols, may not be able to get the correct parameter value on the server side.
Case:
<src= "barcode39.aspx?barcodevalue=http://www.baidu.com.cn:8066/order/ Inputtraininginfo_kcsj.aspx? trainid=1&trainmoney=900&t=2&w=500&h=500 " ID=" imgewm "/>
What if we want the Barcodevalue parameter to be http://www.baidu.com.cn:8066/order/InputTrainingInfo_kcsj.aspx? Trainid=1&trainmoney=900,&t=2,&w=500,&h=500 we need to escape the equals sign, otherwise the server side will default to barcodevalue=http:// Www.baidu.com.cn:8066/order/InputTrainingInfo_kcsj.aspx?,TrainId=1,TrainMoney=900,&t=2,&w=500,&h= 500.
Special symbol escape codes are as follows:
Symbol |
URL brokered results |
Escape codes |
+ |
The + sign in the URL denotes a space |
%2b |
Space |
Spaces in the URL can be used with a + or code |
%20 |
/ |
Separating directories and subdirectories |
%2f |
? |
Separating the actual URLs and parameters |
%3f |
% |
Specify special characters |
%25 |
# |
Represents a bookmark |
%23 |
& |
Delimiter between the parameters specified in the URL |
%26 |
= |
The value of the specified parameter in the URL |
%3d |
After escaping the code:
<src= "barcode39.aspx?barcodevalue=http://www.baidu.com.cn:8066/order/ Inputtraininginfo_kcsj.aspx? trainid%3d1%26trainmoney%3d900&t=2&w=500&h=500 " ID=" imgewm "/>
Escape encoding such as URL parameter +,&,=,/