public String encode (String text, String encoding) {
String encode (String text, String encoding) {
	public String encode (String text, String encoding) {	    if (encoding == null || text == null)	        return text;	    if ("html".equalsIgnoreCase (encoding))	        return HtmlEncoder.encode (text);	    if ("xml".equalsIgnoreCase (encoding))	        return HtmlEncoder.encodeXml (text);	    if ("form".equalsIgnoreCase (encoding))	        return HtmlEncoder.encodeFormValue (text);	    if ("url".equalsIgnoreCase (encoding))	        return UrlEncoder.encode (text);	    return text;	}