@@ -32,15 +32,9 @@ if (remotetk === undefined) {
32
32
}
33
33
34
34
if (remotetk.Client === undefined) {
35
- function unescapeHTML(input) {
36
- var y = document.createElement('textarea');
37
- y.innerHTML = input;
38
- return y.value;
39
- }
40
-
41
35
function handleResult(result, callback, error, nullok) {
42
36
if (result) {
43
- result = JSON.parse(unescapeHTML( result) );
37
+ result = JSON.parse(result);
44
38
if ( Array.isArray(result) && result[0].message && result[0].errorCode ) {
45
39
if ( typeof error === 'function' ) {
46
40
error(result);
@@ -74,6 +68,8 @@ if (remotetk.Client === undefined) {
74
68
remotetk.Client.prototype.describe = function(objtype, callback, error) {
75
69
RemoteTKController.describe(objtype, function(result){
76
70
handleResult(result, callback, error);
71
+ }, {
72
+ escape: false
77
73
});
78
74
}
79
75
@@ -89,6 +85,8 @@ if (remotetk.Client === undefined) {
89
85
remotetk.Client.prototype.create = function(objtype, fields, callback, error) {
90
86
RemoteTKController.create(objtype, JSON.stringify(fields), function(result){
91
87
handleResult(result, callback, error);
88
+ }, {
89
+ escape: false
92
90
});
93
91
}
94
92
@@ -104,6 +102,8 @@ if (remotetk.Client === undefined) {
104
102
remotetk.Client.prototype.retrieve = function(objtype, id, fieldlist, callback, error) {
105
103
RemoteTKController.retrieve(objtype, id, fieldlist, function(result){
106
104
handleResult(result, callback, error);
105
+ }, {
106
+ escape: false
107
107
});
108
108
}
109
109
@@ -123,6 +123,8 @@ if (remotetk.Client === undefined) {
123
123
remotetk.Client.prototype.upsert = function(objtype, externalIdField, externalId, fields, callback, error) {
124
124
RemoteTKController.upser(objtype, externalIdField, externalId, JSON.stringify(fields), function(result){
125
125
handleResult(result, callback, error, true);
126
+ }, {
127
+ escape: false
126
128
});
127
129
}
128
130
*/
@@ -140,6 +142,8 @@ if (remotetk.Client === undefined) {
140
142
remotetk.Client.prototype.update = function(objtype, id, fields, callback, error) {
141
143
RemoteTKController.updat(objtype, id, JSON.stringify(fields), function(result){
142
144
handleResult(result, callback, error, true);
145
+ }, {
146
+ escape: false
143
147
});
144
148
}
145
149
@@ -154,6 +158,8 @@ if (remotetk.Client === undefined) {
154
158
remotetk.Client.prototype.del = function(objtype, id, callback, error) {
155
159
RemoteTKController.del(objtype, id, function(result){
156
160
handleResult(result, callback, error, true);
161
+ }, {
162
+ escape: false
157
163
});
158
164
}
159
165
@@ -167,6 +173,8 @@ if (remotetk.Client === undefined) {
167
173
remotetk.Client.prototype.query = function(soql, callback, error) {
168
174
RemoteTKController.query(soql, function(result){
169
175
handleResult(result, callback, error);
176
+ }, {
177
+ escape: false
170
178
});
171
179
}
172
180
@@ -180,6 +188,8 @@ if (remotetk.Client === undefined) {
180
188
remotetk.Client.prototype.search = function(sosl, callback, error) {
181
189
RemoteTKController.search(sosl, function(result){
182
190
handleResult(result, callback, error);
191
+ }, {
192
+ escape: false
183
193
});
184
194
}
185
195
}
0 commit comments