Index: misc/ajax.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/ajax.js,v
retrieving revision 1.26
diff -u -p -r1.26 ajax.js
--- misc/ajax.js	23 Oct 2010 15:46:43 -0000	1.26
+++ misc/ajax.js	24 Oct 2010 22:38:35 -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 ahah.success(data, status);
+          } catch (err) {
+            // Didn't work? Well, let it fail then
+          }
+        }
         return ajax.error(response, ajax.url);
       }
     },
