diff --git a/mozilla/htmlparser/src/nsParser.cpp b/mozilla/htmlparser/src/nsParser.cpp index c5d2d0e86bb..bd1d35dab90 100644 --- a/mozilla/htmlparser/src/nsParser.cpp +++ b/mozilla/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 (