mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-07-13 11:54:24 +02:00
global-functions: encode all non-alphanumeric characters
This commit is contained in:
parent
213d326ad4
commit
72d7050423
1 changed files with 5 additions and 2 deletions
|
@ -18,8 +18,11 @@
|
||||||
:local Return "";
|
:local Return "";
|
||||||
|
|
||||||
:if ([ :len $Input ] > 0) do={
|
:if ([ :len $Input ] > 0) do={
|
||||||
:local Chars " %&";
|
:local Chars " !\"#\$%&'()*+,-./:;<=>\?@[\\]^_`{|}~";
|
||||||
:local Subs { "%20"; "%25"; "%26" };
|
:local Subs { "%20"; "%21"; "%22"; "%23"; "%24"; "%25"; "%26"; "%27"; "%28"; "%29";
|
||||||
|
"%2A"; "%2B"; "%2C"; "%2D"; "%2E"; "%2F"; "%3A"; "%3B"; "%3C"; "%3D";
|
||||||
|
"%3E"; "%3F"; "%40"; "%5B"; "%5C"; "%5D"; "%5E"; "%5F"; "%60"; "%7B";
|
||||||
|
"%7C"; "%7D"; "%7E" };
|
||||||
|
|
||||||
:for I from=0 to=([ :len $Input ] - 1) do={
|
:for I from=0 to=([ :len $Input ] - 1) do={
|
||||||
:local Char [ :pick $Input $I ];
|
:local Char [ :pick $Input $I ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue