X-Git-Url: http://git.plutz.net/?p=cgilite;a=blobdiff_plain;f=cgilite.sh;h=32aa28bfb5c8cf165a7082e840634fb2e313ac42;hp=f03f74732165e4d672418d3718ecc228db4ac53d;hb=00ba4b0222ec867cc1b629857defb6db4b403530;hpb=b8cec2270b5917e96f57d72c4d1ad96471cad3d3 diff --git a/cgilite.sh b/cgilite.sh index f03f747..32aa28b 100755 --- a/cgilite.sh +++ b/cgilite.sh @@ -27,6 +27,8 @@ BR=' ' cgilite_timeout=2 +debug(){ [ $# -gt 0 ] && printf '%s\n' "$@" >&2 || tee -a /dev/stderr; } + PATH(){ local str seg out [ $# -eq 0 ] && str="$(cat)" || str="$*" @@ -200,6 +202,7 @@ HTML(){ \'*) out="${out}'";; \[*) out="${out}[";; \]*) out="${out}]";; + "${CR}"*) out="${out} ";; "${BR}"*) out="${out} ";; *) out="${out}${str%"${str#?}"}";; esac