Function parseUserURL
Parses a user-provided URL with relaxed rules.
Unlike URL
, 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.
Parameters
Name | Description |
---|---|
url | String representation of the URL |
default_schema | 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. |