|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.velocity.tools.generic.EscapeTool
org.xwiki.velocity.tools.EscapeTool
public class EscapeTool
Tool for working with escaping in Velocity templates. It provides methods to escape outputs for Velocity, Java, JavaScript, HTML, XML and SQL.
Extends the default EscapeTool from velocity-tools since the XML escape performed by it doesn't work inside HTML
content, since apos is not a valid HTML entity name, and it always escapes non-ASCII characters, which
increases the HTML length considerably, while also making the source unreadable.
| Constructor Summary | |
|---|---|
EscapeTool()
|
|
| Method Summary | |
|---|---|
java.lang.String |
xml(java.lang.Object content)
Escapes the XML special characters in a String using numerical XML entities. |
| Methods inherited from class org.apache.velocity.tools.generic.EscapeTool |
|---|
dumpString, getB, getBackslash, getD, getDollar, getE, getExclamation, getH, getHash, getQ, getQuote, getS, getSingleQuote, html, java, javascript, propertyKey, propertyValue, sql, url |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EscapeTool()
| Method Detail |
|---|
public java.lang.String xml(java.lang.Object content)
String using numerical XML entities.
xml in class org.apache.velocity.tools.generic.EscapeToolcontent - the text to escape, may be null
String, null if null input
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||