Git commit 7b3cbac3c4fd2d555ff77f6881cd60b52f23cb76 by Maks Orlovich. Committed on 22/06/2011 at 23:33. Pushed by orlovich into branch 'KDE/4.7'. Make sure that setting the hash to empty sets it #, as per HTML5 2.6 Fixes reload loop on the correlate googlelab (reported on IRC) M +9 -2 khtml/ecma/kjs_window.cpp http://commits.kde.org/kdelibs/7b3cbac3c4fd2d555ff77f6881cd60b52f23cb76 diff --git a/khtml/ecma/kjs_window.cpp b/khtml/ecma/kjs_window.cpp index 5437591..6b6a795 100644 --- a/khtml/ecma/kjs_window.cpp +++ b/khtml/ecma/kjs_window.cpp @@ -2723,8 +2723,15 @@ void Location::put(ExecState *exec, const Identifier &p, JSValue *v, int attr) str = str.mid(1); // Note that we want to do gotoAnchor even when the hash is already set, so we - // scroll the destination into view - url.setRef(str); + // scroll the destination into view. + + // Setting this must always provide a ref, even if just ; see + // HTML5 2.6. + if (str.isEmpty()) { + url.setHTMLRef(""); + } else { + url.setRef(str); + } break; case Host: { QString host = str.left(str.indexOf(":"));