Skip to content

Commit 5c8d11d

Browse files
author
Jose Kahan
committed
JK: lot of enhancements, markup changes, and minor bug fixes done
at W3C by Fumi, Daigo, and myself. See Changelog for details
1 parent b18397e commit 5c8d11d

File tree

12 files changed

+415
-64
lines changed

12 files changed

+415
-64
lines changed

Changelog

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
Version Changes for Hypermail
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
Jose Kahan (Oct 23, 2009)
4+
Various fixes / enhancements developed at W3C by Fumihiro Kato,
5+
Daigo Matsubara and myself:
6+
- Markup changes for deleted messages that are kept.
7+
- New directive: htmlmessage_deleted for setting a custom HTML
8+
message for the body of deleted messages.
9+
- New directives: delete_incremental to disable deleting of existing
10+
messages in the archive when doing an incremental add of a new
11+
message. In some setups, if this feature is enabled, replies to
12+
deleted messages will cause uncontrolled markup escape and
13+
expansion. Feature is enabled by default.
14+
- Updated list of known protocol uris that hypermail will convert
15+
into links.
16+
- Bug fix: setup.c:MakeConfig() CFG_SWITCH was using long instead of
17+
int.
18+
- New directive: fragment_prefix for customizing the prefix that is
19+
put before each URI fragment in a message. Default value is "msg",
20+
the previous hard-coded value.
21+
- New directive: email_address_obfuscation foro enablingemail
22+
address obfuscation using numeric character reference.
23+
- New directive: inline_addlink to add in-line links to content that
24+
is stored in the attachments subdirectory. 'inline_types" must
25+
also be enabled.
26+
- New directive: inreplyto_command, gives a URI template to a script
27+
that hypermail will link to if it's unable to find a corresponding
28+
Message-Id in the archive's messages.
29+
330
Peter McCluskey (May 13, 2008)
431
Change from Fumihiro Kato to fix bug that sometimes caused a charset
532
problem when Content-Type is us-ascii but message headers

src/hypermail.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,11 @@ int main(int argc, char **argv)
623623

624624
writearticles(amount_old, max_msgnum + 1);
625625

626-
if (deletedlist)
626+
/* JK: in function of other hypermail configuration options,
627+
delete_incremental will continuous escape and add more markup
628+
to non-deleted messages that are replies to deleted messages.
629+
Thus, a setup option to disable it */
630+
if (set_delete_incremental && deletedlist)
627631
update_deletions(amount_old);
628632

629633
if (set_show_msg_links) {

src/lang.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ struct language_entry {
226226
#define MSG_TO 161
227227
#define MSG_FROM_TITLE 162
228228
#define MSG_ON_TITLE 163
229-
229+
#define MSG_UNKNOWN_IN_REPLY_TO 164
230230
#ifdef MAIN_FILE
231231

232232
/*
@@ -414,6 +414,7 @@ char *de[] = { /* German */
414414
" bis ", /* to - HTML */
415415
"from", /* from - HTML */
416416
"on", /* on - HTML */
417+
"message archived in another list or period", /* unknown in reply to - HTML */
417418
NULL, /* End Of Message Table - NOWHERE*/
418419
};
419420

@@ -588,6 +589,7 @@ char *pl[] = { /* English */
588589
" to ", /* to - HTML */
589590
"from", /* from - HTML */
590591
"on", /* on - HTML */
592+
"message archived in another list or period", /* unknown in reply to - HTML */
591593
NULL, /* End Of Message Table - NOWHERE*/
592594
};
593595

@@ -763,6 +765,7 @@ char *en[] = { /* English */
763765
" to ", /* to - HTML */
764766
"from", /* from - HTML */
765767
"on", /* on - HTML */
768+
"message archived in another list or period", /* unknown in reply to - HTML */
766769
NULL, /* End Of Message Table - NOWHERE*/
767770
};
768771

@@ -948,6 +951,7 @@ char *es[] = { /* Espanol/Spanish */
948951
" to ", /* to - HTML */
949952
"from", /* from - HTML */
950953
"on", /* on - HTML */
954+
"message archived in another list or period", /* unknown in reply to - HTML */
951955
NULL, /* End Of Message Table */
952956
};
953957

@@ -1125,6 +1129,7 @@ char *pt[] = { /* Brazilian Portuguese */
11251129
"por anexo", /* by attachment - HTML */
11261130
"período", /* period - HTML */
11271131
" para ", /* to - HTML */
1132+
"message archived in another list or period", /* unknown in reply to - HTML */
11281133
NULL, /* End Of Message Table - NOWHERE*/
11291134
};
11301135

@@ -1298,6 +1303,7 @@ char *fi[] = { /* Finnish */
12981303
" to ", /* to - HTML */
12991304
"from", /* from - HTML */
13001305
"on", /* on - HTML */
1306+
"message archived in another list or period", /* unknown in reply to - HTML */
13011307
NULL, /* End Of Message Table - NOWHERE*/
13021308
};
13031309

@@ -1474,6 +1480,7 @@ char *it[] = { /* Italian */
14741480
" to ", /* to - HTML */
14751481
"from", /* from - HTML */
14761482
"on", /* on - HTML */
1483+
"message archived in another list or period", /* unknown in reply to - HTML */
14771484
NULL, /* End Of Message Table - NOWHERE*/
14781485
};
14791486

@@ -1649,6 +1656,7 @@ char *fr[] = { /* French */
16491656
" &eagrave; ", /* to - HTML */
16501657
"from", /* from - HTML */
16511658
"on", /* on - HTML */
1659+
"message archived in another list or period", /* unknown in reply to - HTML */
16521660
NULL, /* End Of Message Table - NOWHERE*/
16531661
};
16541662

@@ -1826,6 +1834,7 @@ char *is[] = { /* Icelandic */
18261834
" to ", /* to - HTML */
18271835
"from", /* from - HTML */
18281836
"on", /* on - HTML */
1837+
"message archived in another list or period", /* unknown in reply to - HTML */
18291838
NULL, /* End Of Message Table - NOWHERE*/
18301839
};
18311840

@@ -2006,6 +2015,7 @@ char *sv[] = {
20062015
" to ", /* to - HTML */
20072016
"from", /* from - HTML */
20082017
"on", /* on - HTML */
2018+
"message archived in another list or period", /* unknown in reply to - HTML */
20092019
NULL, /* End Of Message Table - NOWHERE*/
20102020
};
20112021

@@ -2186,6 +2196,7 @@ char *no[] = {
21862196
" to ", /* to - HTML */
21872197
"from", /* from - HTML */
21882198
"on", /* on - HTML */
2199+
"message archived in another list or period", /* unknown in reply to - HTML */
21892200
NULL, /* End Of Message Table - NOWHERE*/
21902201
};
21912202

@@ -2367,6 +2378,7 @@ char *gr[] = { /* Greek */
23672378
" to ", /* to - HTML */
23682379
"from", /* from - HTML */
23692380
"on", /* on - HTML */
2381+
"message archived in another list or period", /* unknown in reply to - HTML */
23702382
NULL, /* End Of Message Table - NOWHERE*/
23712383
};
23722384

@@ -2540,6 +2552,7 @@ char *ru[] = { /* Russian */
25402552
" to ", /* to - HTML */
25412553
"from", /* from - HTML */
25422554
"on", /* on - HTML */
2555+
"message archived in another list or period", /* unknown in reply to - HTML */
25432556
NULL, /* End Of Message Table - NOWHERE*/
25442557
};
25452558

src/parse.c

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2629,15 +2629,31 @@ msgid);
26292629
inlinecontent(type)) {
26302630
/* if we know our browsers can show this type of context
26312631
as-is, we make a <img> tag instead of <a href>! */
2632-
2632+
if(set_inline_addlink){
2633+
char *created_link =
2634+
createlink(set_attachmentlink,
2635+
&att_dir[strlen(dir)
2636+
+ 1],
2637+
file, num, type);
2638+
trio_snprintf(buffer, sizeof(buffer),
2639+
"<p><img src=\"%s%s%c%s\" alt=\"%s\" />\n<br />\n(%s %s: <a href=\"%s%s\">%s</a>)</p>\n",
2640+
subdir ? subdir->rel_path_to_top : "",
2641+
&att_dir[strlen(dir) + 1],
2642+
PATH_SEPARATOR, file,
2643+
desc, type,
2644+
lang[MSG_ATTACHMENT],
2645+
subdir ? subdir->rel_path_to_top : "",
2646+
created_link, file);
2647+
free(created_link);
2648+
}else {
26332649
trio_snprintf(buffer, sizeof(buffer),
26342650
"<img src=\"%s%s%c%s\" alt=\"%s\" />\n",
26352651
subdir ? subdir->rel_path_to_top : "",
26362652
&att_dir[strlen(dir) + 1],
26372653
PATH_SEPARATOR, file,
26382654
desc);
2639-
}
2640-
else {
2655+
}
2656+
} else {
26412657
char *created_link =
26422658
createlink(set_attachmentlink,
26432659
&att_dir[strlen(dir)
@@ -3003,7 +3019,7 @@ int parse_old_html(int num, struct emailinfo *ep, int parse_body,
30033019
else if (!strcasecmp(command, "name"))
30043020
name = getvalue(line);
30053021
else if (!strcasecmp(command, "email"))
3006-
email = getvalue(line);
3022+
email = unobfuscate_email_address(getvalue(line));
30073023
else if (!strcasecmp(command, "subject")) {
30083024
valp = getvalue(line);
30093025
{

0 commit comments

Comments
 (0)