How do I replace an asterisk in Javascript using replace()?
Try:
queryString = inputText.replace(/\*/g, '%');
Splitting a string into an array and then joining it back into a string is faster than regular expression replacements:
queryString = inputText.split("*").join("%");