From: paul Date: Fri, 15 Apr 2016 11:07:39 +0000 (+0000) Subject: prevent double escaping of & in htmlsafe X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=bbcee9f486a09ea50ff54210a4ae615a498b1be0;p=cgilite prevent double escaping of & in htmlsafe svn path=/trunk/; revision=28 --- diff --git a/cgi.sh b/cgi.sh index 408201f..bba2854 100755 --- a/cgi.sh +++ b/cgi.sh @@ -84,9 +84,9 @@ urlsafe(){ htmlsafe(){ printf %s "$*" \ - | sed 's;<;\<\;;g; + | sed 's;&;\&\;;g; + s;<;\<\;;g; s;>;\>\;;g; - s;&;\&\;;g; s;";\"\;;g; s;'\'';\&apos\;;g;' }