From d135e09bda39814585a3d76b0544ed8b5834b4d0 Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Mon, 11 Aug 2025 14:24:28 -0300 Subject: [PATCH] fix: Fixes Share note option not working on Android for note titles with special characters (#2928) --- packages/web/src/javascripts/Utils/NoteExportUtils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/web/src/javascripts/Utils/NoteExportUtils.ts b/packages/web/src/javascripts/Utils/NoteExportUtils.ts index 38369e001..d0d5a9394 100644 --- a/packages/web/src/javascripts/Utils/NoteExportUtils.ts +++ b/packages/web/src/javascripts/Utils/NoteExportUtils.ts @@ -10,7 +10,7 @@ import snColorsCSS from '!css-loader?{"sourceMap":false}!sass-loader!@standardno // @ts-expect-error Using inline loaders to load CSS as string import exportOverridesCSS from '!css-loader?{"sourceMap":false}!sass-loader!../Components/SuperEditor/Lexical/Theme/export-overrides.scss' import { getBase64FromBlob } from './Utils' -import { parseFileName, parseAndCreateZippableFileName } from '@standardnotes/utils' +import { parseFileName, parseAndCreateZippableFileName, sanitizeFileName } from '@standardnotes/utils' export const getNoteFormat = (application: WebApplicationInterface, note: SNNote) => { if (note.noteType === NoteType.Super) { @@ -28,7 +28,8 @@ export const getNoteFormat = (application: WebApplicationInterface, note: SNNote export const getNoteFileName = (application: WebApplicationInterface, note: SNNote): string => { const format = getNoteFormat(application, note) - return `${note.title}.${format}` + const filename = sanitizeFileName(note.title) + return `${filename}.${format}` } const headlessSuperConverter = new HeadlessSuperConverter()