This is what I did to solve it:
$(function() {
$( "#tabs" ).tabs({
beforeLoad: function( event, ui ) {
ui.ajaxSettings.dataTypes[0] = "html"; //very important!
ui.jqXHR.error(function() {
ui.panel.html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo." );
});
}
});
});