totalcross.ui.html
Class EscapeHtml

totalcross.lang.Object
  extended by totalcross.ui.html.EscapeHtml

public class EscapeHtml
extends totalcross.lang.Object

A class that can be used to convert escape characters in a Html string.

Since:
SuperWaba 5.71

Field Summary
static String amp
          When passing the escaped string to a SOAP service, you must change this to EscapeHtml.amp = "&"; and then set back to null when done.
static StringBuffer sbuf
          The temporary buffer used by the convertion methods.
 
Constructor Summary
EscapeHtml()
           
 
Method Summary
static String escape(String s)
          Converts special chars into escaped sequences.
static String unescape(String escaped)
          Converts escaped sequences into special chars.
 
Methods inherited from class totalcross.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sbuf

public static StringBuffer sbuf
The temporary buffer used by the convertion methods.


amp

public static String amp
When passing the escaped string to a SOAP service, you must change this to
 EscapeHtml.amp = "&";
 
and then set back to null when done.

Since:
TotalCross 1.14
Constructor Detail

EscapeHtml

public EscapeHtml()
Method Detail

escape

public static final String escape(String s)
Converts special chars into escaped sequences. Note that the space is NOT converted.


unescape

public static final String unescape(String escaped)
Converts escaped sequences into special chars. Note that the space IS converted if it appears escaped.