| java.lang.Object com.jcorporate.expresso.core.security.filters.Filter com.jcorporate.expresso.core.security.filters.HtmlFilter com.jcorporate.expresso.core.security.filters.HtmlPlusURLFilter
All known Subclasses: com.jcorporate.expresso.core.security.filters.AllowedHtmlPlusURLFilter,
MAX_CHARS_IN_URL_LABEL | final public static String MAX_CHARS_IN_URL_LABEL(Code) | | Name for Setup value which decides if we are limiting anchor labels
|
URL_INFORMAL_PREFIXES | final public static String[] URL_INFORMAL_PREFIXES(Code) | | |
HtmlPlusURLFilter | public HtmlPlusURLFilter(String[] specialStringList, String[] replaceList) throws IllegalArgumentException(Code) | | Constructor for passing strings and their replacements
Parameters: specialStringList - Strings to replace Parameters: replaceList - The replacement strings |
addHttpPrefixIfNeeded | public static String addHttpPrefixIfNeeded(String url)(Code) | | Given a url string, if it's null or equals "" then just return
it as is. Otherwise check if it is valid form, that is, starts
with http:// or ftp:// or some other valid url prefix. If not,
prepend http://.
Parameters: url - The url string The url with http:// prepended, if needed |
findEndOfHref | public static int findEndOfHref(String s, int start)(Code) | | Finds the end of a hyperlink
Parameters: s - The string Parameters: start - The url's starting index |
hasValidUrlPrefix | public static boolean hasValidUrlPrefix(String url)(Code) | | Return true if the url has a valid prefix, like http://
Parameters: url - |
insertHrefTags | public static String insertHrefTags(String s)(Code) | | Insert a href tag around any http, https, www, or www2 strings
Parameters: s - The string to search in and insert A String with tags and http:// if needed |
isValidUrl | public static boolean isValidUrl(String url)(Code) | | Return true if the url is valid. Checks that it is not
null, that it has a valid prefix, and that it contains
a dot (must, to have a domain name) and at least 2 characters
after the dot (the domain). Add more tests here as appropriate.
Parameters: url - The candidate URL to check True if the URL is valid |
standardFilter | public String standardFilter(String data)(Code) | | This filter HTML encodes all special characters defined by the replacement
list. If a particular character doesn't exist in the map, then the chracter
is passed appended into the result set.
If it does exist, then the value the special character maps to is appended
into the list instead.
Parameters: data - The string to encode. The filtered string |
|
|