summaryrefslogtreecommitdiff
path: root/itjs/it.js
diff options
context:
space:
mode:
authorChristian Helbling2012-04-04 09:25:06 +0000
committerChristian Helbling2012-04-04 09:25:06 +0000
commita0231e4df6f8bfa82451c05998bb349ece764610 (patch)
tree6c1d9e76e8a6388fdf7f1d2435f0da082bd7de62 /itjs/it.js
parent1336ce6ac3baacd1cecbf776cfafa81f8d025272 (diff)
parent14f1c25b43628013507da706544d5c55cb1bc461 (diff)
downloaditools-a0231e4df6f8bfa82451c05998bb349ece764610.tar.gz
itools-a0231e4df6f8bfa82451c05998bb349ece764610.tar.bz2
itools-a0231e4df6f8bfa82451c05998bb349ece764610.zip
Merged devel-utf8 back into live
Diffstat (limited to 'itjs/it.js')
-rw-r--r--itjs/it.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/itjs/it.js b/itjs/it.js
index 54fa5c7..b31423e 100644
--- a/itjs/it.js
+++ b/itjs/it.js
@@ -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)