java.lang.Object
org.htmlunit.csp.url.URLWithScheme
org.htmlunit.csp.url.GUID
Represents an opaque (non-hierarchical) URL that has a scheme and an opaque value
but no host or port, e.g.
data:text/html,..., blob:..., or
javascript:alert(1).
In the URL Standard these are URLs whose scheme is not a
special scheme.
The host and port are always null; the "path" holds the opaque data
after the scheme and colon.
- Author:
- Salvation Team
- See Also:
-
Constructor Details
-
GUID
Constructs a GUID (opaque URL) with the given scheme and opaque value.The host is set to
nulland the port is set tonull. The opaque value is stored as the "path" component.- Parameters:
scheme- the URL scheme (e.g."javascript","data","blob"); will be lowercasedvalue- the opaque data after the scheme colon (e.g."alert(1)"forjavascript:alert(1))
-
-
Method Details
-
parseGUID
Parses an opaque URL from its string representation.The input must begin with a valid scheme followed by a colon (e.g.
"data:text/html,..."). Everything after the colon is stored as the opaque value.
-