org.xwiki.gwt.user.client
Class EscapeUtils

java.lang.Object
  extended by org.xwiki.gwt.user.client.EscapeUtils

public class EscapeUtils
extends java.lang.Object

Provides utility methods for escaping strings.

Version:
$Id: EscapeUtils.java 28853 2010-05-12 16:19:12Z mflorea $

Constructor Summary
protected EscapeUtils()
          Constructor.
 
Method Summary
static java.lang.String escapeComment(java.lang.String text)
          Escapes the -- sequence before setting the text of a comment DOM node.
static java.lang.String unescape(java.lang.String text, char escapeChar)
          Unescapes characters escaped with the specified escape character.
static java.lang.String unescapeBackslash(java.lang.String text)
          Unescapes characters escaped with backslash in the given text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EscapeUtils

protected EscapeUtils()
Constructor.

Method Detail

unescape

public static java.lang.String unescape(java.lang.String text,
                                        char escapeChar)
Unescapes characters escaped with the specified escape character.

Parameters:
text - the text to be unescaped
escapeChar - the character that was used for escaping
Returns:
the unescaped text

unescapeBackslash

public static java.lang.String unescapeBackslash(java.lang.String text)
Unescapes characters escaped with backslash in the given text.

Parameters:
text - the text to be unescaped
Returns:
the unescaped text

escapeComment

public static java.lang.String escapeComment(java.lang.String text)
Escapes the -- sequence before setting the text of a comment DOM node.

Parameters:
text - the text that needs to be put in a comment node
Returns:
the escaped text, which will be put in a comment node


Copyright © 2004-2011 XWiki. All Rights Reserved.