diff options
-rw-r--r-- | itjs/it.js | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -280,6 +280,24 @@ function it_url_encode(str) } /** + * Unicode-safe equivalent of unescape() + * @param str string URL encoded string to be decoded + */ +function it_url_decode(str) +{ + str = str.replace(/\+/g, '%20'); + + // catch URI malformed errors + try { + if (window.decodeURIComponent) + return decodeURIComponent(str); + } + catch(e) {} + + return unescape(str); +} + +/** * Patch PNG transparency for IE 5.5-6 on the given image */ function it_pngfix(img, w, h, mode) |