Revision: 6630
Author: [email protected]
Date: Fri Feb 4 02:38:49 2011
Log: Fix compliance bug in decodeURI/decodeURIComponent.
Review URL: http://codereview.chromium.org/6349105
http://code.google.com/p/v8/source/detail?r=6630
Modified:
/branches/bleeding_edge/src/uri.js
=======================================
--- /branches/bleeding_edge/src/uri.js Tue Dec 7 03:01:02 2010
+++ /branches/bleeding_edge/src/uri.js Fri Feb 4 02:38:49 2011
@@ -205,7 +205,7 @@
octets[0] = cc;
if (k + 3 * (n - 1) >= uriLength) throw new $URIError("URI
malformed");
for (var i = 1; i < n; i++) {
- k++;
+ if (uri.charAt(++k) != '%') throw new $URIError("URI malformed");
octets[i] = URIHexCharsToCharCode(uri.charAt(++k),
uri.charAt(++k));
}
index = URIDecodeOctets(octets, result, index);
@@ -412,4 +412,3 @@
}
SetupURI();
-
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev