handle when browser returns json in a <pre> (yeah, srsly)
This commit is contained in:
parent
2066effe5d
commit
3289a91a84
6
vendor/assets/javascripts/ajaxfileupload.js
vendored
6
vendor/assets/javascripts/ajaxfileupload.js
vendored
@ -100,6 +100,12 @@ jQuery.extend({
|
|||||||
if ( status != "error" )
|
if ( status != "error" )
|
||||||
{
|
{
|
||||||
// process the data (runs the xml through httpData regardless of callback)
|
// process the data (runs the xml through httpData regardless of callback)
|
||||||
|
if ($('pre', xml.responseText)) {
|
||||||
|
var $doc = $("<div />").append(xml.responseText);
|
||||||
|
|
||||||
|
xml = { responseText: $doc.find('pre').get(0).innerHTML};
|
||||||
|
}
|
||||||
|
|
||||||
var data = jQuery.uploadHttpData( xml, s.dataType );
|
var data = jQuery.uploadHttpData( xml, s.dataType );
|
||||||
// If a local callback was specified, fire it and pass it the data
|
// If a local callback was specified, fire it and pass it the data
|
||||||
if ( s.success )
|
if ( s.success )
|
||||||
|
Loading…
Reference in New Issue
Block a user