Some symbols cannot be passed directly in the URL, and if you want to pass these special symbols in the URL, they will be encoded. Some URL special symbols and codes are listed in the following table.
|
|
|
hexadecimal value |
1. |
+ |
the + sign in the URL represents a space |
%2b |
2. |
space |
The spaces in the URL can be used with the + number or code |
%20 |
3. |
/ |
separating directories and subdirectories |
%2f |
4. |
? |
separating the actual URLs and parameters |
%3f |
5. |
% |
Specify special characters |
%25 |
6. |
# |
represents a bookmark |
%23 |
7. |
& the delimiter between the parameters specified in the |
URL |
%26 |
8. |
= |
%3d |
Example: http://localhost:2692/PDFVIEWER/web/viewer.html?file=http://localhost:2692/TOV/DASystem/GetStreaem?path% 3DFTP://FTP Account: FTP password @ip address/0001/e_file3/2017526/test. PDF Solution Method: Replace () method if directly with Str.replace ("-", "!") Only the first matching character is replaced.
and Str.replace (/\-/g, "!") You can replace all matching characters (G is the global flag).
URL pass-through parameter (special character) workaround