From dd1f90819c920f634badf522fbd80dd35afd65f1 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 25 Jul 2021 11:13:27 +0100 Subject: [PATCH] Server: Fixes #5229: Published notes that contain non-alphabetical characters could end up being truncated --- packages/server/src/utils/joplinUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/utils/joplinUtils.ts b/packages/server/src/utils/joplinUtils.ts index 957b51fa0..bfe4d0d1f 100644 --- a/packages/server/src/utils/joplinUtils.ts +++ b/packages/server/src/utils/joplinUtils.ts @@ -218,7 +218,7 @@ async function renderNote(share: Share, note: NoteEntity, resourceInfos: Resourc return { body: bodyHtml, mime: 'text/html', - size: bodyHtml.length, + size: Buffer.byteLength(bodyHtml, 'utf-8'), }; }