added a new function to hold specialchars in history index