added better escaping to URLs