For proxy, quoting would even be harmful (see how this string is created above). For URL, it should be harmless, adding quote.