public class WebUtil
extends java.lang.Object
Constructor and Description |
---|
WebUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escapeHTML(java.lang.String s) |
static java.lang.String |
escapeNewlines(java.lang.String s) |
static java.lang.String |
escapeQuotes(java.lang.String s) |
static java.lang.String |
escapeQuotesAndNewlines(java.lang.String s) |
static java.util.Locale |
normalizeLocale(java.lang.String localeString)
This method checks if input locale string contains control characters and tries to clean up
actually contained ones.
|
static java.lang.String |
sanitizeLocales(java.lang.String localesString)
Convenient method that parses the given string object, that contains locale parameters which
are separated by comma.
|
static java.lang.String |
stripFilename(java.lang.String filename)
Strips out the path from a string if "C:\documents\file.doc", will return "file.doc" if
"file.doc", will return "file.doc" if "/home/file.doc" will return "file.doc"
|
public static java.lang.String escapeHTML(java.lang.String s)
public static java.lang.String escapeQuotes(java.lang.String s)
public static java.lang.String escapeNewlines(java.lang.String s)
public static java.lang.String escapeQuotesAndNewlines(java.lang.String s)
public static java.lang.String stripFilename(java.lang.String filename)
filename
- public static java.util.Locale normalizeLocale(java.lang.String localeString)
localeString
- input string with locale parameterpublic static java.lang.String sanitizeLocales(java.lang.String localesString)
localesString
- input string with locale parameters separeted by comma (e.g.
"en, fr_RW, gh")normalizeLocale(String)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.