From d2eb3b641e5a9482fb501e6ed0bf0be3dbb3bc79 Mon Sep 17 00:00:00 2001 From: "ftang@netscape.com" Date: Tue, 25 May 1999 02:35:27 +0000 Subject: [PATCH] fix bug 6740. approved by christ hofmann. reviewed by harish. This is a temp fix. ftang should move this hack out of parser after M6 --- htmlparser/src/nsParser.cpp | 7 +++++++ parser/htmlparser/src/nsParser.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/htmlparser/src/nsParser.cpp b/htmlparser/src/nsParser.cpp index e6dfb26a2c31..4e0d026dc760 100644 --- a/htmlparser/src/nsParser.cpp +++ b/htmlparser/src/nsParser.cpp @@ -622,6 +622,13 @@ nsresult nsParser::Parse(nsIURL* aURL,nsIStreamObserver* aListener,PRBool aVerif if (rv != NS_OK) return rv; nsAutoString theName(spec); + // Temp hack to prevent reload on mail message + if(-1 != theName.Find("tempMessage.eml")) + { + nsAutoString utf8("UTF-8"); + SetDocumentCharset(utf8, kCharsetFromPreviousLoading); + } + CParserContext* pc=new CParserContext(new nsScanner(theName,PR_FALSE, mCharset, mCharsetSource),aKey,aListener); if(pc) { pc->mMultipart=PR_TRUE; diff --git a/parser/htmlparser/src/nsParser.cpp b/parser/htmlparser/src/nsParser.cpp index e6dfb26a2c31..4e0d026dc760 100644 --- a/parser/htmlparser/src/nsParser.cpp +++ b/parser/htmlparser/src/nsParser.cpp @@ -622,6 +622,13 @@ nsresult nsParser::Parse(nsIURL* aURL,nsIStreamObserver* aListener,PRBool aVerif if (rv != NS_OK) return rv; nsAutoString theName(spec); + // Temp hack to prevent reload on mail message + if(-1 != theName.Find("tempMessage.eml")) + { + nsAutoString utf8("UTF-8"); + SetDocumentCharset(utf8, kCharsetFromPreviousLoading); + } + CParserContext* pc=new CParserContext(new nsScanner(theName,PR_FALSE, mCharset, mCharsetSource),aKey,aListener); if(pc) { pc->mMultipart=PR_TRUE;