org.w3c.tidy.servlet.util
Class HTMLEncode

java.lang.Object
  extended byorg.w3c.tidy.servlet.util.HTMLEncode

public class HTMLEncode
extends java.lang.Object

Converts a String to HTML by converting all special characters to HTML-entities.

Version:
$Revision: 1.5 $ ($Author: vlads $)
Author:
Vlad Skarzhevskyy skarzhevskyy@gmail.com

Method Summary
protected static void buildEntityTables()
           
static java.lang.String encode(java.lang.String s)
          Converts a String to HTML by converting all special characters to HTML-entities.
static java.lang.String encode(java.lang.String s, java.lang.String cr)
          Converts a String to HTML by converting all special characters to HTML-entities.
protected static java.lang.String encodeHREFParam(java.lang.String url)
          Converts a String to valid HTML HREF by converting all special characters to HTML-entities.
protected static java.lang.String encodeHREFParamJava13(java.lang.String value)
           
static java.lang.String encodeHREFQuery(java.lang.String url, java.util.Map args, boolean forHtml)
           
static java.lang.String encodeHREFQuery(java.lang.String url, java.lang.String[] args)
           
static java.lang.String encodeHREFQuery(java.lang.String url, java.lang.String[] args, boolean forHtml)
           
static java.lang.String encodeQuery(java.lang.String url, java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

buildEntityTables

protected static void buildEntityTables()

encode

public static final java.lang.String encode(java.lang.String s)
Converts a String to HTML by converting all special characters to HTML-entities.


encode

public static final java.lang.String encode(java.lang.String s,
                                            java.lang.String cr)
Converts a String to HTML by converting all special characters to HTML-entities.


encodeHREFParam

protected static java.lang.String encodeHREFParam(java.lang.String url)
Converts a String to valid HTML HREF by converting all special characters to HTML-entities.

Parameters:
url - url to be encoded
Returns:
encoded url.

encodeHREFParamJava13

protected static java.lang.String encodeHREFParamJava13(java.lang.String value)

encodeQuery

public static java.lang.String encodeQuery(java.lang.String url,
                                           java.lang.String[] args)

encodeHREFQuery

public static java.lang.String encodeHREFQuery(java.lang.String url,
                                               java.lang.String[] args)

encodeHREFQuery

public static java.lang.String encodeHREFQuery(java.lang.String url,
                                               java.lang.String[] args,
                                               boolean forHtml)

encodeHREFQuery

public static java.lang.String encodeHREFQuery(java.lang.String url,
                                               java.util.Map args,
                                               boolean forHtml)


Copyright © 2004-2005 sourceforge. All Rights Reserved.