Fix for hidden search results class names

Only allow alphanumeric characters
pull/227/head
Kevin Payravi 2023-08-30 23:16:15 -06:00
parent 7f505babbe
commit e0a0656e10
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ function insertCSS() {
// Function to convert strings to consistent IDs
// Used to convert wiki names to element IDs
function stringToId(string) {
return string.replaceAll(' ', '-').replaceAll("'", '').toLowerCase();
return string.replaceAll(' ', '-').replaceAll("'", '').replace(/\W/g, '').toLowerCase();
}
// Function to escape string to use in regex