Eliminate warning: URI.escape is obsolete

And remove unnecessary whitespaces.