Merge pull request #23454 from harddy/master

Fixes #23440 : # symbol in Product Category name breaks Reports CSV e…
This commit is contained in:
Gerhard Potgieter 2019-05-10 10:26:26 +02:00 committed by GitHub
commit d512752ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -138,7 +138,7 @@ jQuery(function( $ ) {
var groupby = $( this ) .data( 'groupby' );
var index_type = $( this ).data( 'index_type' );
var export_format = $( this ).data( 'export' );
var csv_data = 'data:text/csv;charset=utf-8,\uFEFF';
var csv_data = '';
var s, series_data, d;
if ( 'table' === export_format ) {
@ -243,8 +243,9 @@ jQuery(function( $ ) {
} );
}
csv_data = 'data:text/csv;charset=utf-8,\uFEFF' + encodeURIComponent( csv_data );
// Set data as href and return
$( this ).attr( 'href', encodeURI( csv_data ) );
$( this ).attr( 'href', csv_data );
return true;
});
});