diff --git a/src/elogd.c b/src/elogd.c index ca030679..01d5c931 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -16455,7 +16455,8 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, char str[NAME_LENGTH], ref[256], *nowrap, sclass[80], format[256], file_name[MAX_PATH_LENGTH], *slist, *svalue, comment[256]; char display[NAME_LENGTH], attr_icon[80]; - int i, j, i_line, index, colspan, n_attachments, line_len, thumb_status, max_line_len; + int i, j, i_line, index, colspan, n_attachments, line_len, thumb_status, max_line_len, n_lines, + max_n_lines; BOOL skip_comma; FILE *f; struct tm *pts; @@ -17034,8 +17035,7 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, if (show_attachments && attachment[index][0]) { /* check if attachment is inlined */ - sprintf(str, "[img]elog:/%d[/img]", index + 1); - if (strieq(encoding, "ELCode") && stristr(text, str)) + if (is_inline_attachment(encoding, message_id, text, index, attachment[index])) continue; strlcpy(str, attachment[index], sizeof(str)); @@ -17117,23 +17117,53 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, !chkext(attachment[index], ".HTM") && !chkext(attachment[index], ".HTML") && show_attachments) { + rsprintf("\n"); + /* display attachment */ - rsprintf("