Last active
August 29, 2015 13:56
-
-
Save wizard04wsu/8830686 to your computer and use it in GitHub Desktop.
Fixes encodeURI() to comply with RFC 3986 where "[" and "]" are reserved characters.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (){ | |
"use strict"; | |
var oldEncodeURI = encodeURI; | |
encodeURI = function encodeURI(str){ return oldEncodeURI(str).replace(/%5B/ig, "[").replace(/%5D/ig, "]"); }; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment