From f902ea8c6ff7be6eb6060679e3c8d6d487879fc3 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Fri, 5 Feb 2016 10:06:51 +0900 Subject: [PATCH] Fix regression from #152 when the server returns XML anyway --- common/js/xml_handler.js | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/common/js/xml_handler.js b/common/js/xml_handler.js index 8ea72da58..b9c8df76d 100644 --- a/common/js/xml_handler.js +++ b/common/js/xml_handler.js @@ -115,9 +115,23 @@ // Define the error handler. var errorHandler = function(xhr, textStatus) { + + // If the server has returned XML anyway, convert to JSON and call the success handler. + if (textStatus === 'parsererror' && xhr.responseText && xhr.responseText.match(/