]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cgi-bin/template.c
Merge changes from CUPS 1.5svn-r8916.
[thirdparty/cups.git] / cgi-bin / template.c
index f20a7a950342ddd735cef0bd1e756dee7ba8032e..6e9cc5ec6827a81df5fe5c80f3a426cd46dd90d3 100644 (file)
@@ -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(">", out);
     else if (*s == '\"')
       fputs(""", out);
+    else if (*s == '\'')
+      fputs("'", out);
     else if (*s == '&')
       fputs("&", 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);