public class HtmlUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
addPrefixToLines(String prefix,
String input) |
static String |
appendUrls(String url1,
String url2) |
static String |
colorizeAnsiToHtml(String line) |
static String |
encodeUrl(String url)
Deprecated.
since 5.14 use com.atlassian.bamboo.utils.EscapeChars#forUrl instead
|
static String |
getAsPreformattedText(Object o)
Escapes the passed object as a string.
|
static String |
getFirstNCharactersWithTrailer(String s,
int chars) |
static String |
getFirstNLines(String s,
int lines)
Returns the first n lines of the passed string
|
static String |
getFirstNLinesWithTrailer(String s,
int lines) |
static HtmlUtils |
getInstanceForFreemarker() |
static String |
getTextAsHtml(Object o)
Changes text to html, this includes escaping any html specific characters, placing href tags around links and replacing new lines with break tags
|
public static final String WBR
public static final String BSLASH
@NotNull public static String getAsPreformattedText(@Nullable Object o)
o
- - Any object, can be nullpublic static String getTextAsHtml(Object o)
o
- Any object, can be nullpublic static String getFirstNLines(String s, int lines)
s
- - can be nulllines
- must be > 0public static String getFirstNCharactersWithTrailer(@Nullable String s, int chars)
@Deprecated public static String encodeUrl(String url)
url
- public static HtmlUtils getInstanceForFreemarker()
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.