public class PlainTextToHtmlConverter extends Object
Constructor and Description |
---|
PlainTextToHtmlConverter() |
Modifier and Type | Method and Description |
---|---|
static String[] |
encodeHtmlEntities(Object... items)
Encodes the angle brackets, ampersands, and quotation marks in all the input items as HTML entities.
|
static String[] |
encodeHtmlEntities(String... items)
Encodes the angle brackets, ampersands, and quotation marks in all the input items as HTML entities.
|
static String |
encodeHtmlEntities(String text)
Encodes the angle brackets, ampersands, and quotation marks in the input as HTML entities.
|
static String |
matchAndReplaceSpaces(String html) |
static String |
toHtml(String plainText)
The function converts plain text into html in two steps.
|
public static String toHtml(String plainText)
1. utilize the oscore plain2html function to turn the plain text into html including converting linebreaks and special characters. 2. finds occurences of multiple spaces and replaces them with   html entities.
plainText
- the text to encodepublic static String[] encodeHtmlEntities(Object... items)
String.valueOf(java.lang.Object)
.items
- objects to convert to strings and encodepublic static String[] encodeHtmlEntities(String... items)
items
- strings to encodepublic static String encodeHtmlEntities(String text)
text
- string to encodeCopyright © 2003–2016 Atlassian. All rights reserved.