summaryrefslogtreecommitdiff
path: root/cgi-bin/template.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2009-12-09 18:36:59 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2009-12-09 18:36:59 +0000
commitef55b7453303a9a2b20590815c967d044a13da1d (patch)
tree948eaac8dcc2bfdff77ca367ea8ff058cda8c109 /cgi-bin/template.c
parent3fb9c47ea669977c856ad82b3ea593ec76d136ec (diff)
downloadcups-ef55b7453303a9a2b20590815c967d044a13da1d.tar.gz
Merge changes from CUPS 1.5svn-r8916.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1766 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cgi-bin/template.c')
-rw-r--r--cgi-bin/template.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cgi-bin/template.c b/cgi-bin/template.c
index f20a7a950..6e9cc5ec6 100644
--- a/cgi-bin/template.c
+++ b/cgi-bin/template.c
@@ -119,7 +119,7 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
*locptr = '\0'; /* Strip charset */
}
- fprintf(stderr, "DEBUG: lang=\"%s\", locale=\"%s\"...\n",
+ fprintf(stderr, "DEBUG2: lang=\"%s\", locale=\"%s\"...\n",
lang ? lang : "(null)", locale);
/*
@@ -675,6 +675,8 @@ cgi_puts(const char *s, /* I - String to output */
fputs("&gt;", out);
else if (*s == '\"')
fputs("&quot;", out);
+ else if (*s == '\'')
+ fputs("&#39;", out);
else if (*s == '&')
fputs("&amp;", out);
else
@@ -695,7 +697,7 @@ cgi_puturi(const char *s, /* I - String to output */
{
while (*s)
{
- if (strchr("%&+ <>#=", *s) || *s & 128)
+ if (strchr("%@&+ <>#=", *s) || *s < ' ' || *s & 128)
fprintf(out, "%%%02X", *s & 255);
else
putc(*s, out);