From db8d2dacf026f55afe76ce14c204785a00760dcc Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Tue, 6 Sep 2005 07:15:43 +0000 Subject: [PATCH] Show HTML logbook comment properly SVN revision: 1481 --- src/elogd.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index 50df8392..c5b955ae 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.746 2005/09/06 07:15:43 ritt + Show HTML logbook comment properly + Revision 1.745 2005/08/06 19:14:04 ritt Fixed bug in stristr() @@ -7931,7 +7934,7 @@ void show_standard_title(char *logbook, char *text, int printable) /* build reference to first logbook in group */ comment[0] = 0; if (pnode->member[i]->member == NULL) { - getcfg(ref, "Comment", comment, sizeof(comment)); + getcfg(pnode->member[i]->name, "Comment", comment, sizeof(comment)); strlcpy(ref, str, sizeof(ref)); // current node is logbook } else { flb = pnode->member[i]->member[0]; // current node is group @@ -7970,7 +7973,7 @@ void show_standard_title(char *logbook, char *text, int printable) rsputs3(comment); rsprintf("\">"); } else - rsprintf("", ref, comment); + rsprintf("", ref); strlcpy(str, pnode->member[i]->name, sizeof(str)); @@ -8008,7 +8011,12 @@ void show_standard_title(char *logbook, char *text, int printable) strcpy(str, logbook); rsprintf("  "); - rsputs3(str); + + if (is_html(str)) + rsputs(str); + else + rsputs3(str); + rsputs3(text); rsprintf(" \n"); @@ -21661,7 +21669,10 @@ void show_logbook_node(LBLIST plb, LBLIST pparent, int level, int btop) str[0] = 0; getcfg(lb_list[index].name, "Comment", str, sizeof(str)); rsprintf(""); - rsputs3(str); + if (is_html(str)) + rsputs(str); + else + rsputs3(str); rsprintf("\n"); rsprintf(""); rsprintf("%d", *lb_list[index].n_el_index);