org.owasp.webscarab.util
Class HtmlEncoder

java.lang.Object
  extended by org.owasp.webscarab.util.HtmlEncoder

public class HtmlEncoder
extends java.lang.Object


Constructor Summary
HtmlEncoder()
           
 
Method Summary
static java.lang.String decode(java.lang.String s1)
          Given a string containing entity escapes, returns a string containing the actual Unicode characters corresponding to the escapes.
static java.lang.String encode(java.lang.String s1)
          Turns funky characters into HTML entity equivalents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlEncoder

public HtmlEncoder()
Method Detail

encode

public static java.lang.String encode(java.lang.String s1)
Turns funky characters into HTML entity equivalents

e.g. "bread" & "butter" => "bread" & "butter" . Update: supports nearly all HTML entities, including funky accents. See the source code for more detail. Adapted from http://www.purpletech.com/code/src/com/purpletech/util/Utils.java.

Parameters:
s1 - Description of the Parameter
Returns:
Description of the Return Value

decode

public static java.lang.String decode(java.lang.String s1)
Given a string containing entity escapes, returns a string containing the actual Unicode characters corresponding to the escapes. Adapted from http://www.purpletech.com/code/src/com/purpletech/util/Utils.java.

Parameters:
s1 - Description of the Parameter
Returns:
Description of the Return Value