|
|
What steps will reproduce the problem?
Add this code to URITest.as in corelib:
public function testUnescapingUnencodedChars() : void
{
var s:String = "http://test.com/&&!%~ +=";
assertTrue(URI.unescapeChars(s) == s);
}
What is the expected output? What do you see instead?
Brian comments: "The problem is in corelib's com.adobe.net.URI class.
Specifically, URI.unescapeChars calls the global decodeURIComponent, which
throws a URIError because the URI component is not properly UTF-8 encoded.
A reasonable solution is to put the call to decodeURIComponent within a
try-catch block and return the passed-in value if the call throws, perhaps
parametrize this with a throwIfIllegal param, which the URI getters should
set to false."
What version of the product are you using? On what operating system?
corelib-90.zip, Windows XP
Please provide any additional information below.
|