public class Escaper
extends java.lang.Object
Constructor | Description |
---|---|
Escaper() |
Modifier and Type | Method | Description |
---|---|---|
static java.lang.String |
escapeToHTML(java.lang.String in) |
Escape a string to be used as an HTML String literal
|
static java.lang.String |
escapeToJS(java.lang.String in) |
Escape a string to be used as a Javascript String literal.
|
static java.lang.String |
escapeToJSON(java.lang.String in) |
Escape a string to be used as a JSON String literal.
|
static java.lang.String |
urlDecode(java.lang.String in) |
URL encode/decode
This implementation helps addressing two things:
As Apache's mod_proxy unfortunately (and almost utterly incomprehensibly) unescapes URLs before
passing them on to the backend, you can use this method to use an alternative character (e.g.
|
static java.lang.String |
urlDecode(java.lang.String in,
char esc) |
URL encode/decode
This implementation helps addressing two things:
As Apache's mod_proxy unfortunately (and almost utterly incomprehensibly) unescapes URLs before
passing them on to the backend, you can use this method to use an alternative character (e.g.
|
static java.lang.String |
urlEncode(java.lang.String in) |
URL encode/decode
This implementation helps addressing two things:
As Apache's mod_proxy unfortunately (and almost utterly incomprehensibly) unescapes URLs before
passing them on to the backend, you can use this method to use an alternative character (e.g.
|
static java.lang.String |
urlEncode(java.lang.String in,
char esc) |
URL encode/decode
This implementation helps addressing two things:
As Apache's mod_proxy unfortunately (and almost utterly incomprehensibly) unescapes URLs before
passing them on to the backend, you can use this method to use an alternative character (e.g.
|
public static java.lang.String escapeToJSON(java.lang.String in)
public static java.lang.String escapeToJS(java.lang.String in)
public static java.lang.String escapeToHTML(java.lang.String in)
public static java.lang.String urlEncode(java.lang.String in, char esc)
public static java.lang.String urlEncode(java.lang.String in)
public static java.lang.String urlDecode(java.lang.String in, char esc)
public static java.lang.String urlDecode(java.lang.String in)