Replace querystr characters without using regular expressions