Merge pull request #14842 from JoVictorNunes/issue-14801

[2.5] fix(Dashboard): apply charset=UTF-8 to csv data
This commit is contained in:
Anton Georgiev 2022-04-18 10:34:11 -04:00 committed by GitHub
commit 22a4f702f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ class App extends React.Component {
downloadButton.setAttribute('disabled', 'true');
downloadButton.style.cursor = 'not-allowed';
link.setAttribute('href', `data:application/octet-stream,${encodeURIComponent(data)}`);
link.setAttribute('href', `data:text/csv;charset=UTF-8,${encodeURIComponent(data)}`);
link.setAttribute('download', filename);
link.style.display = 'none';
document.body.appendChild(link);