diff options
Diffstat (limited to 'src/LYGetFile.c')
-rw-r--r-- | src/LYGetFile.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/LYGetFile.c b/src/LYGetFile.c index 7ce9a59d..0f55b9b3 100644 --- a/src/LYGetFile.c +++ b/src/LYGetFile.c @@ -420,13 +420,24 @@ Try_Redirected_URL: } else { HTParentAnchor *tmpanchor; CONST char *title; + char *tmptitle = NULL; title = ""; if ((tmpanchor = HTAnchor_parent( HTAnchor_findAddress(&WWWDoc) - )) != NULL) { - if (HTAnchor_title(tmpanchor)) { + )) != NULL && + HTAnchor_title(tmpanchor)) { title = HTAnchor_title(tmpanchor); + } else if (HTMainAnchor && !LYUserSpecifiedURL) { + title = HTAnchor_subject(HTMainAnchor); + if (title && *title) { + if (strncasecomp(title, "Re:", 3)) { + StrAllocCopy(tmptitle, "Re: "); + StrAllocCat(tmptitle, title); + title = tmptitle; + } + } else { + title = ""; } } cp = (char *)strchr(doc->address,':')+1; @@ -434,7 +445,10 @@ Try_Redirected_URL: ((HTMainAnchor && !LYUserSpecifiedURL) ? (char *)HTMainAnchor->address : (char *)doc->address), - title); + title, + (HTMainAnchor && !LYUserSpecifiedURL) ? + HTMainAnchor->message_id : NULL); + FREE(tmptitle); } return(NULLFILE); |