]> git.plutz.net Git - clickslide/commitdiff
keep / in URL coded path
authorPaul Hänsch <paul@plutz.net>
Tue, 17 Jul 2018 01:24:10 +0000 (03:24 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 17 Jul 2018 01:24:10 +0000 (03:24 +0200)
cgilite.sh

index 0c9582b658dd379b69c8bfecb2cfd4c18c623fdc..8859b44c380d13ad61b779775239aeeaabed606c 100755 (executable)
@@ -170,7 +170,7 @@ URL(){
 
   printf %s "$*" \
   | hexdump -v -e '/1 ",%02X"' \
-  | tr , %
+  | tr , % |sed 's;%2F;/;g;'
 }
 
 PATH(){
@@ -181,8 +181,7 @@ PATH(){
             tX;
             s;/[^/]+/\.\./;/;;
             tX;
-            s;^(/.*)/$;\1;
-            s;/+;/;g;'
+            s;^(/.*)/$;\1;'
 }