]> git.plutz.net Git - cgilite/commitdiff
escape CR and TAB in URLs
authorPaul Hänsch <paul@plutz.net>
Wed, 30 Sep 2020 08:32:35 +0000 (10:32 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 30 Sep 2020 08:32:35 +0000 (10:32 +0200)
cgilite.sh

index 32aa28bfb5c8cf165a7082e840634fb2e313ac42..e145f2eebe173be82475cde1ec60fb200a14ed63 100755 (executable)
@@ -225,6 +225,8 @@ URL(){
       \[*) out="${out}%5B";;
       \]*) out="${out}%5D";;
       \ *) out="${out}%20";;
+      "        "*) out="${out}%09";;
+      "${CR}"*) out="${out}%0D";;
       "${BR}"*) out="${out}%0A";;
       %*) out="${out}%25";;
       *) out="${out}${str%"${str#?}"}";;