diff options
author | Deryck Hodge <deryck@samba.org> | 2005-04-19 21:35:42 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:40 -0500 |
commit | dd995fcc534a6501e5cda1d8d214727b5c3599f5 (patch) | |
tree | 3308ffede42a3cec165346173085678d54029cb8 /source3 | |
parent | 1d08b9013a67184b0ecfe8b013926128719b68a6 (diff) | |
download | samba-dd995fcc534a6501e5cda1d8d214727b5c3599f5.tar.gz samba-dd995fcc534a6501e5cda1d8d214727b5c3599f5.tar.bz2 samba-dd995fcc534a6501e5cda1d8d214727b5c3599f5.zip |
r6395: Fix for Bug 2137, from Jay Fenlason <fenlason@redhat.com>
Encode quotes for display in HTML.
deryck
(This used to be commit b9b18a09ea3bf3edba15dc073dd20b195bc6082b)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/web/swat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c index e7402e0a0f..1d6241fdd6 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -215,11 +215,11 @@ static void show_parameter(int snum, struct parm_struct *parm) 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(""%s"%s", utf8_s1, utf8_s2); } else { push_utf8_allocate(&utf8_s1, *list); push_utf8_allocate(&utf8_s2, ((*(list+1))?", ":"")); @@ -235,9 +235,9 @@ static void show_parameter(int snum, struct parm_struct *parm) 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(""%s"%s", *list, ((*(list+1))?", ":"")); else printf("%s%s", *list, ((*(list+1))?", ":"")); } |