From 7c891a42b5b8b5f9e08bb9b32568a67125340c93 Mon Sep 17 00:00:00 2001 From: Alexander Harding <2166114+aeharding@users.noreply.github.com> Date: Wed, 10 Apr 2024 07:15:43 -0500 Subject: [PATCH] Fix incorrectly escaped user export JSON (#2412) Resolves https://github.com/LemmyNet/lemmy/issues/4600 --- src/shared/components/person/settings.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shared/components/person/settings.tsx b/src/shared/components/person/settings.tsx index a3f9d1f2..0be95418 100644 --- a/src/shared/components/person/settings.tsx +++ b/src/shared/components/person/settings.tsx @@ -1615,9 +1615,9 @@ export class Settings extends Component { const res = await HttpService.client.exportSettings(); if (res.state === "success") { - i.exportSettingsLink.current!.href = encodeURI( - `data:application/json,${JSON.stringify(res.data)}`, - ); + i.exportSettingsLink.current!.href = `data:application/json,${encodeURIComponent( + JSON.stringify(res.data), + )}`; i.exportSettingsLink.current?.click(); } else if (res.state === "failed") { toast(