public final class HTMLUtilities
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addNoPopupMsg(HTMLContainer cont) |
static void |
addNoPopupMsg(HTMLContainer cont,
java.lang.String script) |
static java.net.URL |
bestURL(java.lang.String checkURL,
boolean tryUpgradeToSSL) |
static java.lang.String |
downGradeHeader(java.lang.String html,
java.lang.String max)
if max is h3, replace all h1 to h3, h2 to h4, h3 to h5 and h4, h5, h6 to h6 in the html
if h2 is not found, h1 -> h3, h3 -> h4, h4 -> h5, h5 -> h6
if h3 is not found, h1 -> h3, h2 -> h4, h4 -> h5, h5 -> h6
|
static java.lang.String |
makeValidHTMLId(java.lang.String id)
make a valid html id
|
static java.lang.String |
makeValidName(java.lang.String orgName) |
static java.lang.String |
stripTags(java.lang.String html) |
static java.lang.String |
trimHTML(java.lang.String fullhtml,
java.lang.String limit)
Gets the summary of an article
|
public static java.net.URL bestURL(java.lang.String checkURL, boolean tryUpgradeToSSL) throws java.net.MalformedURLException, java.net.URISyntaxException, java.io.IOException
java.net.MalformedURLException
java.net.URISyntaxException
java.io.IOException
public static java.lang.String stripTags(java.lang.String html)
html
- public static java.lang.String makeValidName(java.lang.String orgName)
orgName
- public static java.lang.String makeValidHTMLId(java.lang.String id)
id
- idpublic static void addNoPopupMsg(HTMLContainer cont)
cont
- public static void addNoPopupMsg(HTMLContainer cont, java.lang.String script)
cont
- script
- public static java.lang.String downGradeHeader(java.lang.String html, java.lang.String max)
html
- html to be processedmax
- max header tag, eg: h3public static java.lang.String trimHTML(java.lang.String fullhtml, java.lang.String limit)
fullhtml
- HTML codelimit
- limit, if a number is given, gen return only this number of pure text, if limit is null, return html codestSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.