Bug 496439 - in-message reply-menu should not include "reply list" when List-Post: value is NO, r=philringnalda

This commit is contained in:
Blake Winton 2009-06-29 21:36:25 -07:00
Родитель 8b88b53e61
Коммит b5895f53e2
1 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -893,8 +893,18 @@ function IsReplyAllEnabled()
*/
function IsReplyListEnabled()
{
// ReplyToList is enabled if there is a List-Post header.
return currentHeaderData["list-post"] != null;
// ReplyToList is enabled if there is a List-Post header
// with the correct format.
let listPost = currentHeaderData["list-post"];
if (listPost)
{
// XXX: Once Bug 496914 provides a parser, we should use that instead.
// Until then, we need to keep the following regex in sync with the
// listPost parsing in nsMsgCompose.cpp's
// QuotingOutputStreamListener::OnStopRequest.
return /^<mailto:.*>$/.test(listPost['headerValue']);
}
return false;
}
/**