mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-26 06:11:15 +00:00
Fix incorrectly escaped user export JSON (#2412)
Resolves https://github.com/LemmyNet/lemmy/issues/4600
This commit is contained in:
parent
0894c77b6c
commit
7c891a42b5
1 changed files with 3 additions and 3 deletions
|
@ -1615,9 +1615,9 @@ export class Settings extends Component<SettingsRouteProps, SettingsState> {
|
||||||
const res = await HttpService.client.exportSettings();
|
const res = await HttpService.client.exportSettings();
|
||||||
|
|
||||||
if (res.state === "success") {
|
if (res.state === "success") {
|
||||||
i.exportSettingsLink.current!.href = encodeURI(
|
i.exportSettingsLink.current!.href = `data:application/json,${encodeURIComponent(
|
||||||
`data:application/json,${JSON.stringify(res.data)}`,
|
JSON.stringify(res.data),
|
||||||
);
|
)}`;
|
||||||
i.exportSettingsLink.current?.click();
|
i.exportSettingsLink.current?.click();
|
||||||
} else if (res.state === "failed") {
|
} else if (res.state === "failed") {
|
||||||
toast(
|
toast(
|
||||||
|
|
Loading…
Reference in a new issue