Bug 140080 - Location object attributes shouldn't be decoded?
Summary: Location object attributes shouldn't be decoded?
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-05 07:08 PST by Jonathan Zuckerman
Modified: 2023-12-29 03:14 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Zuckerman 2015-01-05 07:08:46 PST
I might be making some leaps here, or using terminology wrongly, but I think the correct behavior for the Location object is to return a valid URI or URI components in the Location object attributes,

"The value of the href attribute MUST be the absolute URI reference"
http://www.w3.org/TR/Window/#location

and the percent character by itself (not as part of a uri-encoded octet) is not a valid character in a uri,

"Because the percent "%" character always has the reserved purpose of being the escape indicator, it must be escaped as "%25" in order to be used as data within a URI."
https://www.ietf.org/rfc/rfc2396.txt (page 9)

Currently `location.href` will return a decoded version of the url (percent-encoded values will be decoded), is this the correct behavior according to the standards?
Comment 1 Anne van Kesteren 2023-12-29 03:14:01 PST
That's not correct, but that's also no longer happening.