From d049d8fb7aed5a57aeec452035bda610899f78a4 Mon Sep 17 00:00:00 2001 From: Thomas BrĂ¼derli Date: Mon, 12 Nov 2007 13:23:07 +0000 Subject: Use it_url_encode in it_loader; don't escape semicolons to save space --- itjs/it.js | 2 +- itjs/loader.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'itjs') diff --git a/itjs/it.js b/itjs/it.js index a43ba3a..5b914be 100644 --- a/itjs/it.js +++ b/itjs/it.js @@ -173,5 +173,5 @@ function it_url_encode(str) { var result = window.encodeURIComponent ? encodeURIComponent(str) : escape(str).replace(/\+/g, "%2B"); - return result.replace(/%20/gi, "+").replace(/%2C/gi, ",").replace(/%28/gi, "(").replace(/%29/gi, ")"); + return result.replace(/%20/gi, "+").replace(/%2C/gi, ",").replace(/%3B/gi, ";").replace(/%28/gi, "(").replace(/%29/gi, ")"); } diff --git a/itjs/loader.js b/itjs/loader.js index de6ae9d..90463a2 100644 --- a/itjs/loader.js +++ b/itjs/loader.js @@ -157,7 +157,7 @@ post: function(baseurl, data) if (typeof data == 'object') { for (var k in data) - this.post_data += (this.post_data ? "&" : "") + k + "=" + escape(data[k]); + this.post_data += (this.post_data ? "&" : "") + k + "=" + it_url_encode(data[k]); } else this.post_data = data; -- cgit v1.2.3