From 92cb70213aeef9b09c70c104268e78961aa61947 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Thu, 23 May 2024 00:39:49 +0200 Subject: [PATCH] Fix no sanitize check on wi create --- public/scripts/world-info.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 2537681e9..1fa9afd0f 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -2631,7 +2631,9 @@ async function createNewWorldInfo(worldName, { interactive = false } = {}) { return false; } - const allowed = await checkOverwriteExistingData('World Info', world_names, worldName, { interactive: interactive, actionName: 'Create', deleteAction: (existingName) => deleteWorldInfo(existingName) }); + const sanitizedWorldName = await getSanitizedFilename(worldName); + + const allowed = await checkOverwriteExistingData('World Info', world_names, sanitizedWorldName, { interactive: interactive, actionName: 'Create', deleteAction: (existingName) => deleteWorldInfo(existingName) }); if (!allowed) { return false; }