Added url encoding so spaces won't cause a crash.