From 4784fb90d6536866ee21afad7fac5d726ecfffed Mon Sep 17 00:00:00 2001 From: April Sylph <28949509+AprilSylph@users.noreply.github.com> Date: Tue, 22 Feb 2022 11:09:52 +0000 Subject: [PATCH] do not accept special characters in palette key --- src/options/ui.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/options/ui.js b/src/options/ui.js index d91da0e..77ed859 100644 --- a/src/options/ui.js +++ b/src/options/ui.js @@ -4,6 +4,7 @@ const dateTimeFormat = new Intl.DateTimeFormat(undefined, { }); const toCamelCase = string => string + .replace(/\W/g, ' ') .replace(/\s+\D/g, match => match.trim().toUpperCase()) .replace(/\s+/g, '') .replace(/^[A-Z]/, match => match.toLowerCase())