diff --git a/forcetk.js b/forcetk.js index 3b94914..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); } @@ -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 +}