diff options
author | Christian Hesse <mail@eworm.de> | 2020-10-13 08:43:42 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-10-13 08:46:20 +0200 |
commit | fc994402241d97d084669d63f1c8c2accc2550c7 (patch) | |
tree | bd670a0706575985b372fc91f2e4a6dabdb180ec /global-functions | |
parent | 8ddc964cb51430a99285d002fe15a3dcb6a7bdb8 (diff) |
global-functions: $UrlEncode: encode new line & carriage return
Diffstat (limited to 'global-functions')
-rw-r--r-- | global-functions | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/global-functions b/global-functions index 2716355..10c5bd9 100644 --- a/global-functions +++ b/global-functions @@ -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 ]; |