Package io.goobi.viewer.controller
Class HtmlParser
java.lang.Object
io.goobi.viewer.controller.HtmlParser
Tools for parsing html.
- Author:
- Florian Alpers
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic StringgetPlaintext(String htmlText) static booleanGuesses if the given text should be interpreted as html based on the existence of closing html tags or empty line break tags.static StringDuplicate ofStringTools.stripJS(String)because it seemed to fit here.
-
Method Details
-
isHtml
Guesses if the given text should be interpreted as html based on the existence of closing html tags or empty line break tags.- Parameters:
text- text to inspect for HTML markup- Returns:
- true if text is HTML content; false otherwise
-
stripJS
Duplicate ofStringTools.stripJS(String)because it seemed to fit here.- Parameters:
s- string to strip of JavaScript- Returns:
- s stripped of any JavaScript
-
getPlaintext
-
getDisallowedHtmlTags
-
getDisallowedHtmlTagsForDisplay
-
getHtmlReplacements
-