Package de.uplanet.util
Klasse URLValidator
java.lang.Object
de.uplanet.util.URLValidator
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic booleanisSafeWebUrl(String p_strUrl) CallsisSafeWebUrl(String, boolean)with the second parameter set tofalseto disallow single quotes in the URL.static booleanisSafeWebUrl(String p_strUrl, boolean p_bAllowSingleQuotes) Check if the given URL is a safe URL in Intrexx' sense.
-
Methodendetails
-
isSafeWebUrl
CallsisSafeWebUrl(String, boolean)with the second parameter set tofalseto disallow single quotes in the URL.- Parameter:
p_strUrl- The URL.- Gibt zurück:
trueif the URL is considered safe, orfalseotherwise.
-
isSafeWebUrl
Check if the given URL is a safe URL in Intrexx' sense.The URL must meet the following conditions to be considered a safe Web ULR:
- The URL must only contain characters allowed by the spec (http://tools.ietf.org/html/rfc3986).
- The URL must not contain numeric or named HTML character references.
- The scheme must be either
http, orhttps, orftp, or the URL must be a relative URL. - If the URL is absolute it must have an authority part.
- If the URL is relative it must not have an authority part.
- Parameter:
p_strUrl- The URL.p_bAllowSingleQuotes-trueif single quotes are allowed to occur in the attribute value, orfalseotherwise.- Gibt zurück:
trueif the URL is considered safe, orfalseotherwise.
-