diff options
| author | tusooa <tusooa@kazv.moe> | 2022-07-18 00:56:09 +0000 |
|---|---|---|
| committer | tusooa <tusooa@kazv.moe> | 2022-07-18 00:56:09 +0000 |
| commit | 9ddb43296f3fbb6621e646a20e86e05b6c730ad2 (patch) | |
| tree | 3a01f97add6191e8b2bcaf4a9e30edc7b874df09 /src | |
| parent | 1883f722f0d256f08c084cc4809da90173591a4d (diff) | |
| parent | 48c474ed3ab7e83bd833cca2dd01b04981d4e953 (diff) | |
Merge branch 'from/develop/tusooa/export' into 'develop'
Fix non-8bit string export problem
Closes #1174
See merge request pleroma/pleroma-fe!1555
Diffstat (limited to 'src')
| -rw-r--r-- | src/services/export_import/export_import.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/services/export_import/export_import.js b/src/services/export_import/export_import.js index ac67cf9c..7fee0ad3 100644 --- a/src/services/export_import/export_import.js +++ b/src/services/export_import/export_import.js @@ -1,9 +1,11 @@ +import utf8 from 'utf8' + export const newExporter = ({ filename = 'data', getExportedObject }) => ({ exportData () { - const stringified = JSON.stringify(getExportedObject(), null, 2) // Pretty-print and indent with 2 spaces + const stringified = utf8.encode(JSON.stringify(getExportedObject(), null, 2)) // Pretty-print and indent with 2 spaces // Create an invisible link with a data url and simulate a click const e = document.createElement('a') |
