Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URI should use escape/unescape (ascii) as opposed to encode/decodeURI (UTF8) #186

Open
spotco opened this issue Jun 12, 2012 · 0 comments
Open

Comments

@spotco
Copy link

spotco commented Jun 12, 2012

var u:URI = new URI("http://test.com/");
u.chdir("al%e9atoire/");

currently this breaks (%e9 isn't UTF-8, it's ascii) with an exception from decodeURI
http://www.w3schools.com/tags/ref_urlencode.asp
http://www.utf8-chartable.de/

The way I fixed this was changing these two functions in URI.as:

    static public function unescapeChars(escaped:String /*, onlyHighASCII:Boolean = false*/) : String {
        return unescape(escaped);
    }

    static public function fastEscapeChars(unescaped:String, bitmap:URIEncodingBitmap) : String {
        return escape(unescaped);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant