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;