escape CR and BR in HTML output (as previously specified)
authorPaul Hänsch <paul@plutz.net>
Mon, 25 Jul 2022 12:38:02 +0000 (14:38 +0200)
committerPaul Hänsch <paul@plutz.net>
Mon, 25 Jul 2022 12:38:02 +0000 (14:38 +0200)
cgilite.sh

index b47a3e2..2193e29 100755 (executable)
@@ -294,7 +294,7 @@ HTML(){
     \]*) out="${out}&#x5D;";      str="${str#?}";;
     "${CR}"*) out="${out}&#x0D;"; str="${str#?}";;
     "${BR}"*) out="${out}&#x0A;"; str="${str#?}";;
-    *) out="${out}${str%%[]&<>\"\'[]*}"; str="${str#"${str%%[]&<>\"\'[]*}"}";;
+    *) out="${out}${str%%[]&<>\"\'${CR}${BR}[]*}"; str="${str#"${str%%[]&<>\"\'${CR}${BR}[]*}"}";;
   esac; done
   printf %s "$out"
 }