Just to let you know this is now useless as we can do the same using :
<x:inputTextarea value="my text with some \n s" displayValueOnly="true"/>
Sylvain.
On Tue, 2005-03-29 at 08:59 +0200, Mathias Broekelmann wrote:
Hi, wouldn´t 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 <sup> or <sub> markups which replaces special chars in the strings. That interface could be retrieved and registered through an Application sub class. Mathias Oliver Rossmueller wrote: > Sylvain Vieujot wrote: > >> By default, HTMLEncoder.encode( txt ) doesn't encode \n to <br/>. >> So, <h:outputText> 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 escaped" > > when the encode flag is set to true (which is the default). So if you > need <br /> for newlines in your text you have to do it on your own (and > don't forget to set encode="false" for the h:outputText in this case > otherwise the <br/>s will end up on the user's screen). > > Oliver > >> >> Sylvain. > > > >
