diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index 9d4761bc700..38a3d3b6319 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -4189,13 +4189,18 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode) PRBool done = PR_FALSE; while (!done && !token.IsEmpty()) { token.CompressWhitespace(); - if (millis == -1 && nsCRT::IsAsciiDigit(token.First())) { + // Ref. bug 22886 + // Apparently CONTENT can also start with a period (.). + // Ex: + // So let's relax a little bit otherwise http://www.mozillazine.org/resources/ + // wouldn't get redirected to the correct URL. + if (millis == -1 && (nsCRT::IsAsciiDigit(token.First()) || token.First()==PRUnichar('.'))) { PRBool tokenIsANumber = PR_TRUE; nsReadingIterator doneIterating(token.EndReading()); nsReadingIterator iter(token.BeginReading()); while ( iter != doneIterating ) { - if ( !(tokenIsANumber = nsCRT::IsAsciiDigit(*iter)) ) + if (!(tokenIsANumber = nsCRT::IsAsciiDigit(*iter)) && *iter!=PRUnichar('.')) break; ++iter; } diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index 9d4761bc700..38a3d3b6319 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -4189,13 +4189,18 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode) PRBool done = PR_FALSE; while (!done && !token.IsEmpty()) { token.CompressWhitespace(); - if (millis == -1 && nsCRT::IsAsciiDigit(token.First())) { + // Ref. bug 22886 + // Apparently CONTENT can also start with a period (.). + // Ex: + // So let's relax a little bit otherwise http://www.mozillazine.org/resources/ + // wouldn't get redirected to the correct URL. + if (millis == -1 && (nsCRT::IsAsciiDigit(token.First()) || token.First()==PRUnichar('.'))) { PRBool tokenIsANumber = PR_TRUE; nsReadingIterator doneIterating(token.EndReading()); nsReadingIterator iter(token.BeginReading()); while ( iter != doneIterating ) { - if ( !(tokenIsANumber = nsCRT::IsAsciiDigit(*iter)) ) + if (!(tokenIsANumber = nsCRT::IsAsciiDigit(*iter)) && *iter!=PRUnichar('.')) break; ++iter; }