/* * PhoneFilter.java * * Brazil project web application toolkit, * export version: 2.3 * Copyright (c) 2007-2009 Sun Microsystems, Inc. * * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is included as the file "license.terms", * and also available at http://www.sun.com/ * * The Original Code is from: * Brazil project web application toolkit release 2.3. * The Initial Developer of the Original Code is: suhler. * Portions created by suhler are Copyright (C) Sun Microsystems, Inc. * All Rights Reserved. * * Contributor(s): suhler. * * Version: 1.4 * Created by suhler on 07/06/07 * Last modified by suhler on 09/01/30 16:37:41 * * Version Histories: * * 1.4 09/01/30-16:37:41 (suhler) * diag changes * * 1.3 07/06/25-11:19:33 (suhler) * bunches of fixes: * - content encoding * - character set encoding * - better html context determination * * 1.2 07/06/07-11:33:59 (suhler) * doc updates * * 1.2 70/01/01-00:00:02 (Codemgr) * SunPro Code Manager data about conflicts, renames, etc... * Name history : 1 0 sunlabs/PhoneFilter.java * * 1.1 07/06/07-11:28:29 (suhler) * date and time created 07/06/07 11:28:29 by suhler * */ package sunlabs.brazil.filter; import java.io.ByteArrayOutputStream; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.util.StringTokenizer; import java.util.Hashtable; import java.util.Enumeration; import sunlabs.brazil.server.Request; import sunlabs.brazil.server.Server; import sunlabs.brazil.util.Format; import sunlabs.brazil.util.LexML; import sunlabs.brazil.util.http.HttpInputStream; import sunlabs.brazil.util.http.HttpUtil; import sunlabs.brazil.util.http.MimeHeaders; import sunlabs.brazil.util.http.HttpRequest; import sunlabs.brazil.util.regexp.Regexp; import sunlabs.brazil.handler.HtmlRewriter; /** * Rewrite text between markup (and not in links) based on re sub's *