Fix for hidden search results class names
Only allow alphanumeric characterspull/227/head
parent
7f505babbe
commit
e0a0656e10
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue