From d8d40a9bc80fb8648485d5426a1a69cdbdfa155f Mon Sep 17 00:00:00 2001 From: "shanjian%netscape.com" Date: Thu, 4 Apr 2002 02:43:17 +0000 Subject: [PATCH] put my previous patch back in. This patch does not seem like cause any regression in txul. --- htmlparser/src/nsParser.cpp | 176 +++++++++++++---------------- parser/htmlparser/src/nsParser.cpp | 176 +++++++++++++---------------- 2 files changed, 160 insertions(+), 192 deletions(-) diff --git a/htmlparser/src/nsParser.cpp b/htmlparser/src/nsParser.cpp index c5d2d0e86bbd..bd1d35dab905 100644 --- a/htmlparser/src/nsParser.cpp +++ b/htmlparser/src/nsParser.cpp @@ -2121,7 +2121,6 @@ nsParser::DetectMetaTag(const char* aBytes, nsString& aCharset, PRInt32& aCharsetSource) { - PRBool foundContentType = PR_FALSE; aCharsetSource= kCharsetFromMetaTag; aCharset.SetLength(0); @@ -2139,107 +2138,92 @@ nsParser::DetectMetaTag(const char* aBytes, str.BeginReading(begin); str.EndReading(end); - nsReadingIterator tagStart(begin); - nsReadingIterator tagEnd(end); - nsReadingIterator ltPos; + nsReadingIterator currPos(begin); + nsReadingIterator tokEnd; + nsReadingIterator tagEnd(begin); - - while (tagStart != end) { - if (FindCharInReadable('<', tagStart, end)) { - ltPos = tagEnd = tagStart; - if (GetNextChar(ltPos, end) == '!' && - GetNextChar(ltPos, end) == '-' && - GetNextChar(ltPos, end) == '-') { - // Found MDO (