fixed @NoelDavies 's implementation of url friendly fix in generateUrl()