summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/ajax.js2
-rw-r--r--misc/drupal.js12
2 files changed, 1 insertions, 13 deletions
diff --git a/misc/ajax.js b/misc/ajax.js
index 785052f7b..3d0357cbc 100644
--- a/misc/ajax.js
+++ b/misc/ajax.js
@@ -132,7 +132,7 @@ Drupal.ajax = function (base, element, element_settings) {
// Sanity check for browser support (object expected).
// When using iFrame uploads, responses must be returned as a string.
if (typeof response == 'string') {
- response = Drupal.parseJson(response);
+ response = $.parseJson(response);
}
return ajax.success(response, status);
},
diff --git a/misc/drupal.js b/misc/drupal.js
index 5b456a65d..d6f7597c3 100644
--- a/misc/drupal.js
+++ b/misc/drupal.js
@@ -248,18 +248,6 @@ Drupal.theme = function (func) {
};
/**
- * Parse a JSON response.
- *
- * The result is either the JSON object, or an object with 'status' 0 and 'data' an error message.
- */
-Drupal.parseJson = function (data) {
- if ((data.substring(0, 1) != '{') && (data.substring(0, 1) != '[')) {
- return { status: 0, data: data.length ? data : Drupal.t('Unspecified error') };
- }
- return eval('(' + data + ');');
-};
-
-/**
* Freeze the current body height (as minimum height). Used to prevent
* unnecessary upwards scrolling when doing DOM manipulations.
*/