public class HerdStringUtils extends Object
| Constructor and Description |
|---|
HerdStringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkCsvInjection(String text,
String errorMessage)
Check if the text is vulnerable to CSV Injection attack.
|
static String |
decodeBase64(String base64EncodedText)
Decodes and return the base64 encoded string.
|
static String |
getShortDescription(String description,
Integer shortDescMaxLength)
Truncates the description field to a configurable value thereby producing a 'short description'
|
static String |
stripHtml(String fragment,
String... whitelistTags)
Strips HTML tags from a given input String, allows some tags to be retained via a whitelist
|
public static String decodeBase64(String base64EncodedText)
base64EncodedText - the base64 encoded stringpublic static String getShortDescription(String description, Integer shortDescMaxLength)
description - the specified descriptionshortDescMaxLength - the short description maximum lengthpublic static String stripHtml(String fragment, String... whitelistTags)
fragment - the specified StringwhitelistTags - the specified whitelist tagsCopyright © 2019. All rights reserved.