Package | Description |
---|---|
com.google.common.html.types | |
com.google.common.html.types.testing |
Modifier and Type | Field and Description |
---|---|
static SafeUrl |
SafeUrl.INNOCUOUS
The SafeUrl generated by
SafeUrls.sanitize(String) (or
portable.builders.SafeUrls ) when passed
an unsafe URL. |
Modifier and Type | Method and Description |
---|---|
static SafeUrl |
SafeUrls.fromConstant(String url)
Creates a SafeUrl from the given compile-time constant string
url . |
static SafeUrl |
SafeUrls.fromProto(SafeUrlProto proto)
Deserializes a SafeUrlProto into a SafeUrl instance.
|
static SafeUrl |
UncheckedConversions.safeUrlFromStringKnownToSatisfyTypeContract(String url)
Converts a String into a SafeUrl.
|
static SafeUrl |
SafeUrls.sanitize(String url)
Creates a SafeUrl object from the given
url , validating that the input string matches
a pattern of commonly used safe URLs. |
static SafeUrl |
SafeUrls.sanitize(String url,
Set<CustomSafeUrlScheme> extraAllowedSchemes)
Creates a SafeUrl object from the given
url , validating that the input string matches
a pattern of commonly used safe URLs. |
Modifier and Type | Method and Description |
---|---|
SafeHtmlBuilder |
SafeHtmlBuilder.setHref(SafeUrl value)
Sets the
href attribute for any element. |
SafeHtmlBuilder |
SafeHtmlBuilder.setSrc(SafeUrl value)
Sets the
src attribute. |
static SafeUrlProto |
SafeUrls.toProto(SafeUrl url)
Serializes a SafeUrl into its opaque protocol message representation.
|
Modifier and Type | Method and Description |
---|---|
static SafeUrl |
HtmlConversions.newSafeUrlForTest(String string)
Creates a
SafeUrl wrapping the given string . |