From a546074ca921ae321d3cd581ee49075f961ca775 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Fri, 13 Feb 2004 20:45:09 +0000 Subject: [PATCH] Fixed another problem with quotation marks SVN revision: 753 --- src/elogd.c | 151 +++++++++++++++++++++++++++------------------------- 1 file changed, 79 insertions(+), 72 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index 4f0e5bf8..0f07fc59 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.243 2004/02/13 20:45:09 midas + Fixed another problem with quotation marks + Revision 1.242 2004/02/13 20:32:34 midas Attributes can now contain quotation marks @@ -6383,82 +6386,85 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("\n", str, attr_options[index][i]); } - } else + } else { + strencode2(str, attrib[index]); rsprintf("\n", - ua, attrib[index]); + ua, str); + } } else { if (attr_options[index][0][0] == 0) { - if (attr_flags[index] & AF_DATE) { + if (attr_flags[index] & AF_DATE) { - year = month = day = 0; - if (attrib[index][0]) { - ltime = atoi(attrib[index]); - pts = localtime(<ime); - year = pts->tm_year+1900; - month = pts->tm_mon+1; - day = pts->tm_mday; + year = month = day = 0; + if (attrib[index][0]) { + ltime = atoi(attrib[index]); + pts = localtime(<ime); + year = pts->tm_year+1900; + month = pts->tm_mon+1; + day = pts->tm_mday; + } + + /* display date selector */ + rsprintf("\n"); + + rsprintf("\n"); + + if (year) + rsprintf(" %s: ", + loc("Year"), index, year); + else + rsprintf(" %s: ", + loc("Year"), index); + + rsprintf("\n\n"); + + rsprintf("\n"); + + } else { + + /* show normal edit field */ + rsprintf(""); + + strencode2(str, attrib[index]); + rsprintf("\n", + input_size, input_maxlen, ua, str); + + rsprintf("\n"); } - /* display date selector */ - rsprintf("\n"); - - rsprintf("\n"); - - if (year) - rsprintf(" %s: ", - loc("Year"), index, year); - else - rsprintf(" %s: ", - loc("Year"), index); - - rsprintf("\n\n"); - - rsprintf("\n"); - } else { - - /* show normal edit field */ - rsprintf(""); - - strencode2(str, attrib[index]); - rsprintf("\n", - input_size, input_maxlen, ua, str); - - rsprintf("\n"); - } - } else { if (strieq(attr_options[index][0], "boolean")) { /* display checkbox */ @@ -13522,9 +13528,10 @@ void show_elog_message(LOGBOOK * lbs, char *dec_path, char *command) rsprintf("\n"); - for (i = 0; i < lbs->n_attr; i++) - rsprintf("\n", attr_list[i], - attrib[i]); + for (i = 0; i < lbs->n_attr; i++) { + strencode2(str, attrib[i]); + rsprintf("\n", attr_list[i], str); + } /* browsing flag to distinguish "/../=" from browsing */ rsprintf("\n");