Closed Bug 394537 Opened 17 years ago Closed 11 years ago

Update the encodeURI and the decodeURI JavaScript functions to reflect the new reserved characters in RFC 3986

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: FranklinWhale, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 The encodeURI and the decodeURI JavaScript functions are based on an obsoleted standard - RFC 2396 (http://tools.ietf.org/html/rfc2396). In RFC 2396, reserved characters are: reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," In the newer standard which obsoleted RFC 2396, RFC 3986 (http://tools.ietf.org/html/rfc3986), the list of reserved characters extended a lot: reserved = gen-delims / sub-delims gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" All of the reserved characters should be encoded by the encodeURI function. Since the decodeURI function is based on the encodeURI function, if the encodeURI function is updated, that should also be updated. Reproducible: Always Actual Results: Only the reserved characters defined in RFC 2396 are encoded Expected Results: All reserved characters defined in RFC 3986 should be encoded
encodeURIComponent and decodeURIComponent are necessary to be updated as well because the list of unreserved characters have been changed.
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
These functions need to behave as described in ECMAScript. And they do.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.