Summary: | [testcase] HTTP-EQUIV="refresh" not working with wierd formating. | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | jtwatson |
Component: | general | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
jtwatson
2004-03-20 03:10:21 UTC
CVS commit by mueller: CCMAIL: 78049-done@bugs.kde.org M +5 -0 ChangeLog 1.233 M +7 -14 xml/dom_docimpl.cpp 1.275 --- kdelibs/khtml/xml/dom_docimpl.cpp #1.274:1.275 @@ -959,5 +959,5 @@ void DocumentImpl::recalcStyle( StyleCha _style->setFontDef(fontDef); _style->htmlFont().update( paintDeviceMetrics() ); - if ( parseMode() != Strict ) + if ( inCompatMode() ) _style->setHtmlHacks(true); // enable html specific rendering tricks @@ -1505,21 +1505,14 @@ void DocumentImpl::processHttpEquiv(cons pos = str.find(QRegExp("[ \t]")); + bool ok = false; + int delay = kMax( 0, content.implementation()->toInt(&ok) ); + if ( !ok && str.length() && str[0] == '.' ) + ok = true; + if (pos == -1) // There can be no url (David) { - bool ok = false; - int delay = 0; - delay = content.implementation()->toInt(&ok); if(ok) v->part()->scheduleRedirection(delay, v->part()->url().url() ); } else { - int delay = 0; - int fract = pos; - bool ok = false; - if ( (fract = str.find('.') ) < 0 || fract > pos) - fract = pos; - DOMStringImpl* s = content.implementation()->substring(0, fract); - delay = s->toInt(&ok); - delete s; - pos++; while(pos < (int)str.length() && str[pos].isSpace()) pos++; @@ -1533,5 +1526,5 @@ void DocumentImpl::processHttpEquiv(cons str = parseURL( DOMString(str) ).string(); QString newURL = getDocument()->completeURL( str ); - if ( ok || !fract) + if ( ok ) v->part()->scheduleRedirection(delay, getDocument()->completeURL( str ), delay < 2 || newURL == URL().url()); } --- kdelibs/khtml/ChangeLog #1.232:1.233 @@ -1,2 +1,7 @@ +2004-03-20 Dirk Mueller <mueller@kde.org> + + * xml/dom_docimpl.cpp (processHttpEquiv): improve refresh handling for negative and + slightly malformed delays (#78049) + 2004-03-18 Lubos Lunak <l.lunak@kde.org> |