diff --git a/js/src/sql.js b/js/src/sql.js index 5c87fde8e2..cfad2a068b 100644 --- a/js/src/sql.js +++ b/js/src/sql.js @@ -376,7 +376,9 @@ AJAX.registerOnload('sql.js', function () { textArea.value += '\n'; $('.table_results tbody tr').each(function () { $(this).find('.data span').each(function () { - textArea.value += $(this).text() + '\t'; + // Extract tag for NULL values before converting to string to not mess up formatting + var data = $(this).find('em').length !== 0 ? $(this).find('em')[0] : this; + textArea.value += $(data).text() + '\t'; }); textArea.value += '\n'; });