[Webkit-unassigned] [Bug 30225] window.location.href needlessly decodes URI-encoded characters in the URI path

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 12 08:53:06 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=30225





--- Comment #5 from Andrei Popescu <andreip at google.com>  2009-10-12 08:53:06 PDT ---
(In reply to comment #3)
> (From update of attachment 40896 [details])
> You ChangeLog is duplicated.
> 
> I don't really like pathRaw(), maybe encodedPath()?  Or should path be
> decodedPath()?
> 

Actually, I think that using the conversion to String operator is enough. This
returns the string that was built in the KURL::parse() method.

> fast/dom/Window/Location/location-path-has-is-unmodified.htm is sorta a js
> test, except you didn't generate the tempate using make-script-test-wrappers.
> 
> Why does this need to be run from onload?  It needs to wait for the iframe to
> load?  Will body onload do that?
> 

Yes.

> (If this needs to wait for onload, then it won't work quite right as a js test,
> so maybe that's why you ddid it this way.)
>

That's right. In fact, I just used the pattern I found in the
fast/dom/HTMLObjectElement/object-as-frame.html test that I had to modify. Note
that that test also uses an onload handler to test the window.location.href
property of an iframe.



> +        correctValue = "path%2Dwith-escape%2Dcharacters.html";
> +        shouldBe("result", "correctValue");
> 
> shouldBeEqualToString("normalizeURL(String(window.frames[0].location.href))",
> "path%2Dwith-escape%2Dcharacters.html");
> would have been better.
> 

Done.

> Does this actually need to load a valid resource to work?

Actually it doesn't if I use a data URL. Done.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list