зеркало из https://github.com/mozilla/pjs.git
simply creates a "title" tag with the subject in it. This enables the printed
mail msgs to display the subject as the title in the progress dialog and on the printed page Bug 156307 r=ducarroz sr=spitzer
This commit is contained in:
Родитель
773aca105c
Коммит
62158e0c50
|
@ -51,6 +51,7 @@
|
|||
#include "nsMimeTypes.h"
|
||||
#include "prtime.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "prprf.h"
|
||||
|
||||
// hack: include this to fix opening news attachments.
|
||||
#include "nsINntpUrl.h"
|
||||
|
@ -308,6 +309,17 @@ nsMimeHtmlDisplayEmitter::EndHeader()
|
|||
UtilityWriteCRLF("<html>");
|
||||
UtilityWriteCRLF("<head>");
|
||||
|
||||
char *subject = nsEscapeHTML(GetHeaderValue(HEADER_SUBJECT, mHeaderArray));
|
||||
if (subject)
|
||||
{
|
||||
PRInt32 bufLen = strlen(subject) + 16;
|
||||
char *buf = new char[bufLen];
|
||||
PR_snprintf(buf, bufLen, "<title>%s</title>", subject);
|
||||
UtilityWriteCRLF(buf);
|
||||
delete [] buf;
|
||||
nsMemory::Free(subject);
|
||||
}
|
||||
|
||||
// mscott --> we should refer to the style sheet used in msg display...this one is wrong i think.
|
||||
// Stylesheet info!
|
||||
UtilityWriteCRLF("<link rel=\"important stylesheet\" href=\"chrome://messenger/skin/messageBody.css\">");
|
||||
|
|
Загрузка…
Ссылка в новой задаче