diff --git a/src/elogd.c b/src/elogd.c index b3cc3957..4f0e5bf8 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.242 2004/02/13 20:32:34 midas + Attributes can now contain quotation marks + Revision 1.241 2004/02/09 21:46:24 midas Implemented 'type = date' @@ -4302,7 +4305,7 @@ void rsputs2(const char *str) j += 4; break; - /* the translation for the search highliting */ + /* the translation for the search highliting */ case '\001': strcat(return_buffer, "<"); j++; @@ -5539,7 +5542,7 @@ void strencode(char *text) rsprintf(" "); break; - /* the translation for the search highliting */ + /* the translation for the search highliting */ case '\001': rsprintf("<"); break; @@ -5565,28 +5568,28 @@ void strencode2(char *b, char *text) { int i; - for (i = 0; i < (int) strlen(text); b++, i++) { + *b = 0; + for (i = 0; i < (int) strlen(text); i++) { switch (text[i]) { case '\n': - sprintf(b, "
\n"); + strcat(b, "
\n"); break; case '<': - sprintf(b, "<"); + strcat(b, "<"); break; case '>': - sprintf(b, ">"); + strcat(b, ">"); break; case '&': - sprintf(b, "&"); + strcat(b, "&"); break; case '\"': - sprintf(b, """); + strcat(b, """); break; default: - sprintf(b, "%c", text[i]); + sprintf(b+strlen(b), "%c", text[i]); } } - *b = 0; } /*------------------------------------------------------------------*/ @@ -6397,7 +6400,6 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL day = pts->tm_mday; } - /* display date selector */ rsprintf("\n", - input_size, input_maxlen, ua, attrib[index]); + rsprintf(""); + + strencode2(str, attrib[index]); + rsprintf("\n", + input_size, input_maxlen, ua, str); + + rsprintf("\n"); + } } else { if (strieq(attr_options[index][0], "boolean")) {