Merge pull request #2419 from Risenafis/fix-sanitize
Fix non-ASCII name character voice setting
This commit is contained in:
commit
20a23c5e31
|
@ -915,7 +915,7 @@ function getCharacters(unrestricted) {
|
|||
|
||||
function sanitizeId(input) {
|
||||
// Remove any non-alphanumeric characters except underscore (_) and hyphen (-)
|
||||
let sanitized = input.replace(/[^a-zA-Z0-9-_]/g, '');
|
||||
let sanitized = encodeURIComponent(input).replace(/[^a-zA-Z0-9-_]/g, '');
|
||||
|
||||
// Ensure first character is always a letter
|
||||
if (!/^[a-zA-Z]/.test(sanitized)) {
|
||||
|
|
Loading…
Reference in New Issue