Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 55693 invoked from network); 17 Jan 2010 18:51:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jan 2010 18:51:24 -0000 Received: (qmail 37890 invoked by uid 500); 17 Jan 2010 18:51:24 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 37828 invoked by uid 500); 17 Jan 2010 18:51:24 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 37819 invoked by uid 99); 17 Jan 2010 18:51:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Jan 2010 18:51:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Jan 2010 18:51:23 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C08612388978; Sun, 17 Jan 2010 18:51:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r900192 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java Date: Sun, 17 Jan 2010 18:51:02 -0000 To: commits@felix.apache.org From: fmeschbe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100117185103.C08612388978@eris.apache.org> Author: fmeschbe Date: Sun Jan 17 18:51:01 2010 New Revision: 900192 URL: http://svn.apache.org/viewvc?rev=900192&view=rev Log: FELIX-1957 Replace use of String.replaceAll not available in OSGi/Minimum-1.0 EE by using a StringTokenizer to replace all occurrences of "<" in strings by "<". Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java?rev=900192&r1=900191&r2=900192&view=diff ============================================================================== --- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java (original) +++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java Sun Jan 17 18:51:01 2010 @@ -31,6 +31,7 @@ import java.util.Properties; import java.util.SortedMap; import java.util.SortedSet; +import java.util.StringTokenizer; import java.util.TreeMap; import java.util.TreeSet; import java.util.zip.ZipEntry; @@ -515,7 +516,21 @@ { if ( string.indexOf( '<' ) >= 0 ) { - super.write( string.replaceAll( "<", "<" ) ); + // TODO: replace with WebConsoleUtil.escapeHtml() + // this "convoluted" code replaces "<" by "<" + final StringTokenizer tokener = new StringTokenizer( string, "<", true ); + while ( tokener.hasMoreElements() ) + { + final String token = tokener.nextToken(); + if ( "<".equals( token ) ) + { + super.write( "<" ); + } + else + { + super.write( token ); + } + } } else {