]> git.plutz.net Git - cgilite/blobdiff - cgilite.sh
escape CR and BR in HTML output (as previously specified)
[cgilite] / cgilite.sh
index 7af962332cde39d1a4f0583da271159f8281f475..2193e29ff90069b181db9475c439c89f34e5f529 100755 (executable)
@@ -164,7 +164,7 @@ if [ -z "$REQUEST_METHOD" ]; then
     done
 
     export REMOTE_ADDR SERVER_NAME SERVER_PORT REQUEST_METHOD REQUEST_URI SERVER_PROTOCOL \
-           PATH_INFO QUERY_STRING CONTENT_TYPE CONTENT_LENGTH
+           PATH_INFO QUERY_STRING CONTENT_TYPE CONTENT_LENGTH cgilite_headers
 
     # Try to serve multiple requests, provided that script serves a
     # Content-Length header.
@@ -294,7 +294,7 @@ HTML(){
     \]*) out="${out}]";      str="${str#?}";;
     "${CR}"*) out="${out}
"; str="${str#?}";;
     "${BR}"*) out="${out}
"; str="${str#?}";;
-    *) out="${out}${str%%[]&<>\"\'[]*}"; str="${str#"${str%%[]&<>\"\'[]*}"}";;
+    *) out="${out}${str%%[]&<>\"\'${CR}${BR}[]*}"; str="${str#"${str%%[]&<>\"\'${CR}${BR}[]*}"}";;
   esac; done
   printf %s "$out"
 }