shithub: werc

Download patch

ref: b3c7e530d59357bcab12510e01925f67962b833b
parent: 55b948c02d4d96eeeb476875a4c9b5bd3ec7fb9f
author: sl <sl@stanleylieber.com>
date: Fri Jun 12 16:51:42 EDT 2020

bin/cgilib.rc: fn urlencode -> fn nurlencode; fn urldecode -> fn nurldecode. avoid confusion and delay.

--- a/bin/cgilib.rc
+++ b/bin/cgilib.rc
@@ -29,9 +29,9 @@
         ifs='&
 '       for(pair in `{cat}) {
             ifs='=' { pair=`{echo -n $pair} }
-            n='post_arg_'^`{echo $pair(1)|urldecode|tr -cd 'a-zA-Z0-9_'}
+            n='post_arg_'^`{echo $pair(1)|nurldecode|tr -cd 'a-zA-Z0-9_'}
             post_args=( $post_args $n )
-            ifs=() { $n=`{echo -n $pair(2)|urldecode|tr -d '
'} }
+            ifs=() { $n=`{echo -n $pair(2)|nurldecode|tr -d '
'} }
         }
         pair=()
     }
@@ -64,7 +64,7 @@
     END { printf "%s", buf }'
 }
 
-fn urldecode { $PLAN9/bin/urlencode -d || url_decode}	# GROSS
+fn nurldecode { urlencode -d || url_decode}	# GROSS
 
 fn url_decode {
 awk '
@@ -109,7 +109,7 @@
 '
 }
 
-fn urlencode { $PLAN9/bin/urlencode $* || url_encode }	# GROSS
+fn nurlencode { urlencode || url_encode }	# GROSS
 
 fn url_encode {
     awk '