Hi Dapeng, Are you sure you need to replace all " " with " ", they have different semanitcs. Also you might need to replace quotes with ""e;" and ">" and "<" with ">" and "<"
Renat On 05/02/2008, Dapeng <[EMAIL PROTECTED]> wrote: > > here is what i doing ... > > > <t:outputraw value="escapedBody"/> > > public String getEscapedBody() { > return someString.replace("&", "&") > .replace("\r\n", "<br/>") > .replace("\n", "<br/>") > .replace(" ", " "); > } > > > > Howard Lewis Ship wrote: > > You can easily write a component to handle this task; something based > > on OutputText, but using a different Regexp to determine where a > > paragraph ends. > > > > On Feb 4, 2008 8:18 PM, Mark W. Shead <[EMAIL PROTECTED]> wrote: > > > >> I have a textarea field that users may enter multiple paragraphs. > >> Paragraphs are separated by two carriage returns. Obviously when I > >> show the contents in HTML the paragraphs don't show up. > >> > >> I'm sure can also do some type of regex to add <p/> at the end of > >> each line and package it into my own component. > >> > >> Is there another way of doing this using existing components that I'm > >> overlooking. I > >> > >> Mark > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Best regards, Renat Zubairov