public class EscapeTool
extends org.apache.velocity.tools.generic.EscapeTool
| Constructor and Description | 
|---|
| EscapeTool() | 
| Modifier and Type | Method and Description | 
|---|---|
| String | escapeQuote(Object string)Escapes the double quotes in a string with a backslash. | 
| String | escapeSingleQuote(Object string)Escapes the single quotes in a string with a backslash. | 
| String | javascriptInline(Object string)Exposes  StringEscapeHelper.escapeJavaScriptInlineHtml(String)to the Velocity engine. | 
| String | javascriptSimple(Object string)Escapes only single and double quotes with a backslash. | 
| String | jsonInline(Object string)Exposes  StringEscapeHelper.escapeJsonInlineHtml(String)to the Velocity engine. | 
| String | nonWordChars(Object string)Exposes  StringEscapeHelper.escapeNonWordCharacters(String)to velocity templates. | 
| String | xmlSimple(Object string)Simple version of XML escaping which delegates to
  StringEscapeHelper.escapeXml(String). | 
configure, dumpString, getB, getBackslash, getD, getDollar, getE, getExclamation, getH, getHash, getKey, getN, getNewline, getQ, getQuote, getS, getSingleQuote, html, java, javascript, propertyKey, propertyValue, setKey, sql, unicode, url, velocity, xmlpublic String escapeQuote(Object string)
string - string to escapepublic String escapeSingleQuote(Object string)
string - the string to escapepublic String javascriptInline(Object string)
StringEscapeHelper.escapeJavaScriptInlineHtml(String) to the Velocity engine.string - the string to escapeStringEscapeHelper.escapeJavaScriptInlineHtml(String)public String javascriptSimple(Object string)
string - string to escapepublic String jsonInline(Object string)
StringEscapeHelper.escapeJsonInlineHtml(String) to the Velocity engine.string - the serialized JSON string to escapeStringEscapeHelper.escapeJsonInlineHtml(String)public String nonWordChars(Object string)
StringEscapeHelper.escapeNonWordCharacters(String) to velocity templates.string - the string to escapeStringEscapeHelper.escapeNonWordCharacters(String)public String xmlSimple(Object string)
StringEscapeHelper.escapeXml(String).string - string to escapeCopyright © 2019 Communote team. All rights reserved.