Ignore decimal point when deciding if meta refresh contains garbage. r=radha@netscape.com sr=alecf@netscape.com a=asa@mozilla.org

git-svn-id: svn://10.0.0.236/trunk@137318 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
locka%iol.ie 2003-02-03 13:11:40 +00:00
parent 05b149cd95
commit 151d4ffd02

View File

@ -3854,11 +3854,13 @@ nsDocShell::SetupRefreshURIFromHeader(nsIURI * aBaseURI,
if (specifiesSeconds)
{
// Non-whitespace characters here mean that the string is
// malformed.
if (iter == iterAfterDigit && !nsCRT::IsAsciiSpace(*iter))
// malformed but tolerate sites that specify a decimal point,
// even though meta refresh only works on whole seconds.
if (iter == iterAfterDigit &&
!nsCRT::IsAsciiSpace(*iter) && *iter != '.')
{
// There is no space between the seconds and this character
// so the seconds are garbage!
// The characters between the seconds and the next
// section are just garbage!
// e.g. content="2a0z+,URL=http://www.mozilla.org/"
// Just ignore this redirect.
return NS_ERROR_FAILURE;