mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-06-29 20:54:30 +02:00
global-functions: $UrlEncode: encode new line & carriage return
This commit is contained in:
parent
8ddc964cb5
commit
fc99440224
1 changed files with 5 additions and 4 deletions
|
@ -879,10 +879,11 @@
|
|||
:local Return "";
|
||||
|
||||
:if ([ :len $Input ] > 0) do={
|
||||
:local Chars " !\"#\$%&'()*+,:;<=>\?@[\\]^`{|}~";
|
||||
:local Subs { "%20"; "%21"; "%22"; "%23"; "%24"; "%25"; "%26"; "%27"; "%28"; "%29";
|
||||
"%2A"; "%2B"; "%2C"; "%3A"; "%3B"; "%3C"; "%3D"; "%3E"; "%3F"; "%40";
|
||||
"%5B"; "%5C"; "%5D"; "%5E"; "%60"; "%7B"; "%7C"; "%7D"; "%7E" };
|
||||
:local Chars "\n\r !\"#\$%&'()*+,:;<=>\?@[\\]^`{|}~";
|
||||
:local Subs { "%0A"; "%0D"; "%20"; "%21"; "%22"; "%23"; "%24"; "%25"; "%26"; "%27";
|
||||
"%28"; "%29"; "%2A"; "%2B"; "%2C"; "%3A"; "%3B"; "%3C"; "%3D"; "%3E";
|
||||
"%3F"; "%40"; "%5B"; "%5C"; "%5D"; "%5E"; "%60"; "%7B"; "%7C"; "%7D";
|
||||
"%7E" };
|
||||
|
||||
:for I from=0 to=([ :len $Input ] - 1) do={
|
||||
:local Char [ :pick $Input $I ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue