]> git.plutz.net Git - cgilite/commitdiff
avoid confusion regarding carriage return when escaping HTML (especially in textarea)
authorPaul Hänsch <paul@plutz.net>
Mon, 7 Sep 2020 01:51:22 +0000 (03:51 +0200)
committerPaul Hänsch <paul@plutz.net>
Mon, 7 Sep 2020 01:51:22 +0000 (03:51 +0200)
cgilite.sh

index 2e538324c0a8b5ec45f6fb2235f254fcf359db22..32aa28bfb5c8cf165a7082e840634fb2e313ac42 100755 (executable)
@@ -202,6 +202,7 @@ HTML(){
       \'*) out="${out}&#x27;";;
       \[*) out="${out}&#x5B;";;
       \]*) out="${out}&#x5D;";;
+      "${CR}"*) out="${out}&#x0D;";;
       "${BR}"*) out="${out}&#x0A;";;
       *) out="${out}${str%"${str#?}"}";;
     esac