Index: misc/ajax.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/ajax.js,v
retrieving revision 1.25
diff -w -u -p -r1.25 ajax.js
--- misc/ajax.js	21 Oct 2010 19:31:39 -0000	1.25
+++ misc/ajax.js	10 Nov 2010 21:45:16 -0000
@@ -148,6 +148,15 @@ Drupal.ajax = function (base, element, e
     complete: function (response, status) {
       ajax.ajaxing = false;
       if (status == 'error' || status == 'parsererror') {
+        if (response.responseText != "") {
+          try {
+            // Recover from annoying browser-extension that injects html into pages
+            var data = response = Drupal.parseJson(response.responseText.replace(/<div.*<\/div>$/, ""));
+            return ajax.success(data, status);
+          } catch (err) {
+            // Didn't work? Well, let it fail then
+          }
+        }
         return ajax.error(response, ajax.url);
       }
     },
