]> git.plutz.net Git - cgilite/blobdiff - cgilite.sh
Merge branch 'master' of git.plutz.net:cgilite
[cgilite] / cgilite.sh
index 12350777ae2f9a94c8ea9137eaef654e97746498..a84de140c97867d1a1fc074ac252e390dbf22c7c 100755 (executable)
@@ -49,7 +49,7 @@ HEX_DECODE='
 '
 
 HEX_DECODE(){
-  printf "$(printf %s "$1" |sed -r "$HEX_DECODE")"
+  printf -- "$(printf %s "$1" |sed -r "$HEX_DECODE")"
 }
 
 if [ -z "$REQUEST_METHOD" ]; then
@@ -116,7 +116,7 @@ cgilite_value(){
     str=${str#*&${name}=}
     cnt=$((cnt - 1))
   done
-  printf "$(printf %s "${str%%&*}" |sed -r 's;\+; ;g;'"$HEX_DECODE")"
+  printf -- "$(printf %s "${str%%&*}" |sed -r 's;\+; ;g;'"$HEX_DECODE")"
 }
 
 GET(){ cgilite_value "${QUERY_STRING}" $@; }