svn commit: samba r6396 - in trunk/source/web: .

deryck at samba.org deryck at samba.org
Tue Apr 19 21:36:40 GMT 2005


Author: deryck
Date: 2005-04-19 21:36:27 +0000 (Tue, 19 Apr 2005)
New Revision: 6396

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6396

Log:

Fix for Bug 2137, from Jay Fenlason <fenlason at redhat.com>
Encode quotes for display in HTML.

deryck

Modified:
   trunk/source/web/swat.c


Changeset:
Modified: trunk/source/web/swat.c
===================================================================
--- trunk/source/web/swat.c	2005-04-19 21:35:42 UTC (rev 6395)
+++ trunk/source/web/swat.c	2005-04-19 21:36:27 UTC (rev 6396)
@@ -215,11 +215,11 @@
 		if ((char ***)ptr && *(char ***)ptr && **(char ***)ptr) {
 			char **list = *(char ***)ptr;
 			for (;*list;list++) {
-				/* enclose in quotes if the string contains a space */
+				/* enclose in HTML encoded quotes if the string contains a space */
 				if ( strchr_m(*list, ' ') ) {
 					push_utf8_allocate(&utf8_s1, *list);
 					push_utf8_allocate(&utf8_s2, ((*(list+1))?", ":""));
-					printf("\'%s\'%s", utf8_s1, utf8_s2);
+					printf("&quot;%s&quot;%s", utf8_s1, utf8_s2);
 				} else {
 					push_utf8_allocate(&utf8_s1, *list);
 					push_utf8_allocate(&utf8_s2, ((*(list+1))?", ":""));
@@ -235,9 +235,9 @@
 		if (parm->def.lvalue) {
 			char **list = (char **)(parm->def.lvalue);
 			for (; *list; list++) {
-				/* enclose in quotes if the string contains a space */
+				/* enclose in HTML encoded quotes if the string contains a space */
 				if ( strchr_m(*list, ' ') ) 
-					printf("\'%s\'%s", *list, ((*(list+1))?", ":""));
+					printf("&quot;%s&quot;%s", *list, ((*(list+1))?", ":""));
 				else
 					printf("%s%s", *list, ((*(list+1))?", ":""));
 			}



More information about the samba-cvs mailing list