From 23e43cd69afcdc6d5d30478fb892b5141d973d28 Mon Sep 17 00:00:00 2001 From: Beat <75857504+BeatACVR@users.noreply.github.com> Date: Mon, 30 Dec 2024 16:00:53 -0500 Subject: [PATCH] packgen - allow spaces in author/pack name also convert spaces to underscores or dashes --- packgen.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packgen.html b/packgen.html index 6051626..2876d4a 100644 --- a/packgen.html +++ b/packgen.html @@ -332,9 +332,9 @@

Release Sounds (max 25)

document.querySelectorAll('input[type="text"]').forEach(input => { input.addEventListener('input', (e) => { const value = e.target.value; - if (!/^[a-zA-Z0-9-_]*$/.test(value)) { - alert('Only alphanumeric characters, dashes (-), and underscores (_) are allowed.'); - e.target.value = value.replace(/[^a-zA-Z0-9-_]/g, ''); + if (!/^[a-zA-Z0-9-_ ]*$/.test(value)) { + alert('Only alphanumeric characters, spaces, dashes (-), and underscores (_) are allowed.'); + e.target.value = value.replace(/[^a-zA-Z0-9-_ ]/g, ''); } }); });