From 489da0e37e5fc416f66079d5624f465e1a3d5a71 Mon Sep 17 00:00:00 2001 From: Masashi Tsuji Date: Tue, 10 Sep 2013 13:34:51 +0900 Subject: [PATCH 1/2] escape method has been deprecated escape method has been deprecated since ECMAScript v3. --- forcetk.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/forcetk.js b/forcetk.js index 3b94914..1de2f30 100644 --- a/forcetk.js +++ b/forcetk.js @@ -445,7 +445,7 @@ if (forcetk.Client === undefined) { * @param [error=null] function to which jqXHR will be passed in case of error */ forcetk.Client.prototype.query = function(soql, callback, error) { - return this.ajax('/' + this.apiVersion + '/query?q=' + escape(soql) + return this.ajax('/' + this.apiVersion + '/query?q=' + encodeURI(soql) , callback, error); } @@ -481,7 +481,7 @@ if (forcetk.Client === undefined) { * @param [error=null] function to which jqXHR will be passed in case of error */ forcetk.Client.prototype.search = function(sosl, callback, error) { - return this.ajax('/' + this.apiVersion + '/search?q=' + escape(sosl) + return this.ajax('/' + this.apiVersion + '/search?q=' + encodeURI(sosl) , callback, error); } -} \ No newline at end of file +} From 2146ab6fa9719b0cdb779e6c5619260edfc2318d Mon Sep 17 00:00:00 2001 From: Masashi Tsuji Date: Thu, 12 Sep 2013 00:24:27 +0900 Subject: [PATCH 2/2] add return to retrieve add return to retrieve --- forcetk.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forcetk.js b/forcetk.js index 1de2f30..ad0d58c 100644 --- a/forcetk.js +++ b/forcetk.js @@ -388,7 +388,7 @@ if (forcetk.Client === undefined) { fieldlist = null; } var fields = fieldlist ? '?fields=' + fieldlist : ''; - this.ajax('/' + this.apiVersion + '/sobjects/' + objtype + '/' + id + return this.ajax('/' + this.apiVersion + '/sobjects/' + objtype + '/' + id + fields, callback, error); }