parseUserURL

Parses a user-provided URL with relaxed rules.

Unlike URL.parse, this allows the URL to use special characters as part of the host name and path, automatically employing puny code or percent-encoding to convert this to a valid URL.

parseUserURL
(
string url
,)

Parameters

url string

String representation of the URL

default_schema string

If url does not contain a schema name, the URL parser may choose to use this schema instead. A browser might use "http" or "https", for example.

Meta