replaced bad hacks with url escaping