]> git.plutz.net Git - cgilite/commitdiff
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 b47a3e2e683219b773af4383059a6701f2d44d46..2193e29ff90069b181db9475c439c89f34e5f529 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"
 }