Skip to content

Commit dc78f26

Browse files
author
Peter McCluskey
committed
xhtml patch
1 parent 3530faf commit dc78f26

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

Changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Version Changes for Hypermail
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
Peter McCluskey (Nov 14, 2007)
4+
Applied xhtml patch from Zvi Har'El.
5+
36
Peter McCluskey (Oct 1, 2007)
47
Changes from Fumihiro Kato to fix bugs on 64 bit systems and some
58
possible buffer overflow problems.

src/print.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -302,19 +302,19 @@ void fprint_menu0(FILE *fp, struct emailinfo *email, int pos)
302302
fprintf (fp, "<a name=\"%s\" id=\"%s\"></a>",id,id);
303303
fprintf(fp, "<dfn>%s</dfn>:", lang[MSG_CONTEMPORARY_MSGS_SORTED]);
304304
if (show_index[dlev][DATE_INDEX])
305-
fprintf(fp, " [ <a href=\"%s#%d\" title=\"%s\">%s</a> ]",
305+
fprintf(fp, " [ <a href=\"%s#msg%d\" title=\"%s\">%s</a> ]",
306306
index_name[dlev][DATE_INDEX], num,
307307
lang[MSG_LTITLE_BY_DATE], lang[MSG_BY_DATE]);
308308
if (show_index[dlev][THREAD_INDEX])
309-
fprintf(fp, " [ <a href=\"%s#%d\" title=\"%s\">%s</a> ]",
309+
fprintf(fp, " [ <a href=\"%s#msg%d\" title=\"%s\">%s</a> ]",
310310
index_name[dlev][THREAD_INDEX], num,
311311
lang[MSG_LTITLE_BY_THREAD], lang[MSG_BY_THREAD]);
312312
if (show_index[dlev][SUBJECT_INDEX])
313-
fprintf(fp, " [ <a href=\"%s#%d\" title=\"%s\">%s</a> ]",
313+
fprintf(fp, " [ <a href=\"%s#msg%d\" title=\"%s\">%s</a> ]",
314314
index_name[dlev][SUBJECT_INDEX], num,
315315
lang[MSG_LTITLE_BY_SUBJECT], lang[MSG_BY_SUBJECT]);
316316
if (show_index[dlev][AUTHOR_INDEX])
317-
fprintf(fp, " [ <a href=\"%s#%d\" title=\"%s\">%s</a> ]",
317+
fprintf(fp, " [ <a href=\"%s#msg%d\" title=\"%s\">%s</a> ]",
318318
index_name[dlev][AUTHOR_INDEX], num,
319319
lang[MSG_LTITLE_BY_AUTHOR], lang[MSG_BY_AUTHOR]);
320320
if (show_index[dlev][ATTACHMENT_INDEX])
@@ -808,7 +808,7 @@ void printdates(FILE *fp, struct header *hp, int year, int month, struct emailin
808808
subj_tag = "";
809809
subj_end_tag = "";
810810
}
811-
fprintf(fp,"%s<a href=\"%s\">%s%s%s</a>%s<a name=\"%d\" id=\"%d\"><em>%s</em></a>%s%s%s\n",
811+
fprintf(fp,"%s<a href=\"%s\">%s%s%s</a>%s<a name=\"msg%d\" id=\"msg%d\"><em>%s</em></a>%s%s%s\n",
812812
startline, msg_href(em, subdir_email, FALSE),
813813
subj_tag, subj, subj_end_tag, break_str, em->msgnum, em->msgnum, tmpptr=convchars(em->name,em->charset),
814814
break_str, date_str, endline);
@@ -850,11 +850,11 @@ int printattachments(FILE *fp, struct header *hp, struct emailinfo *subdir_email
850850
/* consider that if there's an attachment directory, there are attachments */
851851
nb_attach++;
852852
if (set_indextable) {
853-
fprintf(fp, "<tr><td>%s%s</a></td><td><a name=\"%d\" id=\"%d\"><em>%s</em></a></td>" "<td>%s</td></tr>\n", msg_href(em, subdir_email, TRUE), subj, em->msgnum, em->msgnum, tmpptr=convchars(em->name,em->charset), getindexdatestr(em->date));
853+
fprintf(fp, "<tr><td>%s%s</a></td><td><a name=\"msg%d\" id=\"msg%d\"><em>%s</em></a></td>" "<td>%s</td></tr>\n", msg_href(em, subdir_email, TRUE), subj, em->msgnum, em->msgnum, tmpptr=convchars(em->name,em->charset), getindexdatestr(em->date));
854854
}
855855
else {
856856
fprintf(fp, "<li>%s%s<dfn>%s</dfn></a>&nbsp;"
857-
"<a name=\"%d\" id=\"%d\"><em>%s</em></a>&nbsp;<em>(%s)</em>\n",
857+
"<a name=\"msg%d\" id=\"msg%d\"><em>%s</em></a>&nbsp;<em>(%s)</em>\n",
858858
(*is_first) ? first_attributes : "",
859859
msg_href(em, subdir_email, TRUE), subj, em->msgnum, em->msgnum, tmpptr=convchars(em->name,em->charset),
860860
getindexdatestr(em->date));
@@ -1271,7 +1271,7 @@ void printbody(FILE *fp, struct emailinfo *email, int maybe_reply, int is_reply)
12711271
fprintf(fp, "</pre>\n");
12721272
pre = FALSE;
12731273
}
1274-
fprintf(fp, "<p>\n");
1274+
fprintf(fp, "<br />\n");
12751275
}
12761276
else {
12771277
if (!pre) {
@@ -1322,7 +1322,7 @@ void printbody(FILE *fp, struct emailinfo *email, int maybe_reply, int is_reply)
13221322
Akis Karnouskos <akis@ceid.upatras.gr> */
13231323
{
13241324
if (!pre)
1325-
fprintf(fp, "<p>");
1325+
fprintf(fp, "<br />");
13261326
}
13271327
else {
13281328
if (insig) {
@@ -2634,7 +2634,7 @@ void printsubjects(FILE *fp, struct header *hp, char **oldsubject,
26342634
endline = "</li>";
26352635
}
26362636
fprintf(fp,
2637-
"%s%s%s</a>%s <a name=\"%d\" id=\"%d\">%s</a>%s\n", startline,
2637+
"%s%s%s</a>%s <a name=\"msg%d\" id=\"msg%d\">%s</a>%s\n", startline,
26382638
msg_href(hp->data, subdir_email, TRUE), tmpptr=convchars(hp->data->name,hp->data->charset), break_str,
26392639
hp->data->msgnum, hp->data->msgnum, date_str, endline);
26402640
*oldsubject = hp->data->unre_subject;
@@ -2788,7 +2788,7 @@ void printauthors(FILE *fp, struct header *hp, char **oldname,
27882788
snprintf(date_str, sizeof(date_str), "<em>(%s)</em>", getindexdatestr(hp->data->date));
27892789
endline = "</li>";
27902790
}
2791-
fprintf(fp,"%s%s%s</a>%s<a name=\"%d\" id=\"%d\">%s</a>%s\n",
2791+
fprintf(fp,"%s%s%s</a>%s<a name=\"msg%d\" id=\"msg%d\">%s</a>%s\n",
27922792
startline, msg_href(hp->data, subdir_email, TRUE), subj, break_str,
27932793
hp->data->msgnum, hp->data->msgnum, date_str, endline);
27942794
if(subj)

src/threadprint.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ static void format_thread_info(FILE *fp, struct emailinfo *email,
279279
if (set_indextable) {
280280
fprintf(fp,
281281
"<tr><td>%s<a href=\"%s\"%s><strong>%s</strong></a></td>"
282-
"<td nowrap><a name=\"%d\" id=\"%d\">%s</a></td>" "<td nowrap>%s</td></tr>\n",
282+
"<td nowrap><a name=\"msg%d\" id=\"msg%d\">%s</a></td>" "<td nowrap>%s</td></tr>\n",
283283
level > 1 ? "--&gt; " : "",
284284
href, first_attributes,
285285
subj, email->msgnum, email->msgnum, tmpname, getindexdatestr(email->date));
@@ -290,7 +290,7 @@ static void format_thread_info(FILE *fp, struct emailinfo *email,
290290
num_open_li[level]--;
291291
}
292292
fprintf(fp, "<li><a href=\"%s\"%s>%s</a>&nbsp;"
293-
"<a name=\"%d\" id=\"%d\"><em>%s</em></a>&nbsp;<em>(%s)</em>\n",
293+
"<a name=\"msg%d\" id=\"msg%d\"><em>%s</em></a>&nbsp;<em>(%s)</em>\n",
294294
href, first_attributes,
295295
subj, email->msgnum, email->msgnum, tmpname, getindexdatestr(email->date));
296296
}

0 commit comments

Comments
 (0)