]> git.plutz.net Git - cgilite/commitdiff
Merge branch 'master' of plutz.net:cgilite
authorPaul Hänsch <paul@plutz.net>
Thu, 4 Apr 2019 12:09:45 +0000 (14:09 +0200)
committerPaul Hänsch <paul@plutz.net>
Thu, 4 Apr 2019 12:09:45 +0000 (14:09 +0200)
1  2 
cgilite.sh
html-sh.sed

diff --cc cgilite.sh
index 8af3eb12790b998f59d8421778aff333c619ca53,a84de140c97867d1a1fc074ac252e390dbf22c7c..7eab08a5b4bc92691b34e7cdc3e61679f2f8d2b6
@@@ -116,21 -116,11 +116,21 @@@ 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")"
  }
  
 +cgilite_keys(){
 +  local str="&$1"
 +  while [ "${str#*&}" != "${str}" ]; do
 +    str="${str#*&}"
 +    printf '%s\n' "${str%%=*}"
 +  done \
 +  | sort -u
 +}
 +
  GET(){ cgilite_value "${QUERY_STRING}" $@; }
  GET_COUNT(){ cgilite_count "${QUERY_STRING}" $1; }
 +GET_KEYS(){ cgilite_keys "${QUERY_STRING}"; }
  
  POST(){ cgilite_value "${cgilite_post}" $@; }
  POST_COUNT(){ cgilite_count "${cgilite_post}" $1; }
diff --cc html-sh.sed
Simple merge