summaryrefslogtreecommitdiffstats
path: root/source/web
diff options
context:
space:
mode:
authorDeryck Hodge <deryck@samba.org>2005-04-19 21:35:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:40 -0500
commitb9b18a09ea3bf3edba15dc073dd20b195bc6082b (patch)
treeee4811c32d12ca0ebb785021ce6ed181d48d0af3 /source/web
parent615a62b21f8d2f7f97bde2f166ddd6849d39b95c (diff)
downloadsamba-b9b18a09ea3bf3edba15dc073dd20b195bc6082b.tar.gz
samba-b9b18a09ea3bf3edba15dc073dd20b195bc6082b.tar.xz
samba-b9b18a09ea3bf3edba15dc073dd20b195bc6082b.zip
r6395: Fix for Bug 2137, from Jay Fenlason <fenlason@redhat.com>
Encode quotes for display in HTML. deryck
Diffstat (limited to 'source/web')
-rw-r--r--source/web/swat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/web/swat.c b/source/web/swat.c
index e7402e0a0f6..1d6241fdd65 100644
--- a/source/web/swat.c
+++ b/source/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("&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 @@ 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("&quot;%s&quot;%s", *list, ((*(list+1))?", ":""));
else
printf("%s%s", *list, ((*(list+1))?", ":""));
}