Correctly treats "localhost" as a URL.