Return-Path: Delivered-To: apmail-incubator-myfaces-dev-archive@www.apache.org Received: (qmail 50041 invoked from network); 29 Mar 2005 14:52:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Mar 2005 14:52:24 -0000 Received: (qmail 15420 invoked by uid 500); 29 Mar 2005 14:52:23 -0000 Delivered-To: apmail-incubator-myfaces-dev-archive@incubator.apache.org Received: (qmail 15378 invoked by uid 500); 29 Mar 2005 14:52:23 -0000 Mailing-List: contact myfaces-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list myfaces-dev@incubator.apache.org Received: (qmail 15364 invoked by uid 99); 29 Mar 2005 14:52:23 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of heath.borders@gmail.com designates 64.233.170.194 as permitted sender) Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.194) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 29 Mar 2005 06:52:21 -0800 Received: by rproxy.gmail.com with SMTP id c16so1740462rne for ; Tue, 29 Mar 2005 06:52:20 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=RLzXRPtjZ2nMLbn928DJZsxldWegmqcjD+9dSuhzhBFHvqJO+b0/X9f8PTFS5zvcqpdCfixrgk3L7XdmIyr+OYY+eRLeGl0W4Ii7SJksOj4H0NW14H0ZYOk53D5FL12wkvHB+SdMLVOwwV39Alda/R8jzwE/gAZs8NCO+j2G7E8= Received: by 10.38.10.43 with SMTP id 43mr197990rnj; Tue, 29 Mar 2005 06:52:18 -0800 (PST) Received: by 10.38.151.18 with HTTP; Tue, 29 Mar 2005 06:52:17 -0800 (PST) Message-ID: Date: Tue, 29 Mar 2005 08:52:17 -0600 From: Heath Borders Reply-To: hborders@mail.win.org To: MyFaces Development Subject: Re: HTMLEcoder and \n In-Reply-To: <4248FCCF.60606@psi.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable References: <1111942238.6340.19.camel@sv> <42488E27.3020402@tuxerra.com> <4248FCCF.60606@psi.de> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N For something like its really not hard to write your own renderer, or to write a custom renderer. We could always apply logic like you're asking to an tag/renderer. On Tue, 29 Mar 2005 08:59:27 +0200, Mathias Broekelmann wrote: > Hi, >=20 > wouldn=B4t it be nice to have a pluggable interface for those issues? > Setting escape to false requires the user to encode all characters to > valid html/xml. We also have a requirement to print or > markups which replaces special chars in the strings. That interface > could be retrieved and registered through an Application sub class. >=20 > Mathias >=20 > Oliver Rossmueller wrote: > > Sylvain Vieujot wrote: > > > >> By default, HTMLEncoder.encode( txt ) doesn't encode \n to
. > >> So, doesn't encode the new lines either. > >> > >> Is this expected ? > >> > >> My guess would be that by default, the new lines should be encoded. > > > > > > Sylvain, > > > > to not encode newline characters is expected behaviour, the spec does > > not require h:outputText to encode newlines. There is only the > > requirement that > > > > "characters that are sensitive in HTML and XML markup must be escape= d" > > > > when the encode flag is set to true (which is the default). So if you > > need
for newlines in your text you have to do it on your own (an= d > > don't forget to set encode=3D"false" for the h:outputText in this case > > otherwise the
s will end up on the user's screen). > > > > Oliver > > > >> > >> Sylvain. > > > > > > > > >=20 >=20 --=20 -Heath Borders-Wing hborders@mail.win.org