org.xwiki.gwt.user.client
Class EscapeUtils

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

public class EscapeUtils
extends Object

Provides utility methods for escaping strings.

Version:
$Id: 2f6123a9457700c601e3ac75cf8d9e8e9dac83f4 $

Constructor Summary
protected EscapeUtils()
          Constructor.
 
Method Summary
static String escapeComment(String text)
          Escapes the -- sequence before setting the text of a comment DOM node.
static String unescape(String text, char escapeChar)
          Unescapes characters escaped with the specified escape character.
static String unescapeBackslash(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 String unescape(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 String unescapeBackslash(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 String escapeComment(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–2015 XWiki. All rights reserved.