From bbcee9f486a09ea50ff54210a4ae615a498b1be0 Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 15 Apr 2016 11:07:39 +0000 Subject: [PATCH] prevent double escaping of & in htmlsafe svn path=/trunk/; revision=28 --- cgi.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;' } -- 2.39.2