Added an algorithm for replace space with %20 in a string