Package com.google.gwt.safehtml.shared
Class SafeUriHostedModeUtils
java.lang.Object
com.google.gwt.safehtml.shared.SafeUriHostedModeUtils
SafeUri utilities whose implementation differs between Development and Production Mode.
This class has a super-source peer that provides the Production Mode implementation.
Do not use this class - it is used for implementation only, and its methods may change in the future.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisValidUriCharset(String uri) Tests whether all characters in the given URI are valid Web Addresses characters.static voidmaybeCheckValidUri(String uri) Checks if the provided URI is a valid Web Address (per RFC 3987bis).static voidsetForceCheckValidUri(boolean check) Sets a global flag that controls whether or notmaybeCheckValidUri(String)should perform its check in a server-side environment.static voidSets a global flag that controls whether or notmaybeCheckValidUri(String)should perform its check in a server-side environment from the value of the "com.google.gwt.safehtml.ForceCheckValidUri" property.
-
Field Details
-
HREF_DISCRETE_UCSCHAR
All valid Web Addresses discrete characters, i.e. the reserved, iunreserved, href-ucschar, and href-pct-form productions from RFC 3986 and RFC 3987bis, with the exception of character ranges. -
FORCE_CHECK_VALID_URI
Name of system property that if set, enables checks in server-side code (even if assertions are disabled).- See Also:
-
-
Constructor Details
-
SafeUriHostedModeUtils
public SafeUriHostedModeUtils()
-
-
Method Details
-
isValidUriCharset
Tests whether all characters in the given URI are valid Web Addresses characters. -
maybeCheckValidUri
Checks if the provided URI is a valid Web Address (per RFC 3987bis).- Parameters:
uri- the URL to check
-
setForceCheckValidUri
public static void setForceCheckValidUri(boolean check) Sets a global flag that controls whether or notmaybeCheckValidUri(String)should perform its check in a server-side environment.- Parameters:
check- if true, perform server-side checks.
-
setForceCheckValidUriFromProperty
public static void setForceCheckValidUriFromProperty()Sets a global flag that controls whether or notmaybeCheckValidUri(String)should perform its check in a server-side environment from the value of the "com.google.gwt.safehtml.ForceCheckValidUri" property.
-