On Wed, 18 Apr 2012 20:32:12 +0200, Tim <koop...@gmail.com> wrote:

On 18/04/2012 1:25 PM, Martin Strand wrote:
Another option is to leave the code as it is right now and fix this with CSS instead:

p.mytext {
    white-space: pre;
}

I originally did it this way, but I found that really long lines didn't wrap at all--they just went off the page.

Oh yes, that should be "pre-wrap" (won't work in older IEs)
http://www.quirksmode.org/css/whitespace.html


Does anyone know a convenient and secure way to escape HTML?

There's commons-lang:
http://commons.apache.org/lang/api-2.5/org/apache/commons/lang/StringEscapeUtils.html#escapeHtml(java.lang.String)



Btw, a third option is to create a loop over yourString.split("\n") and then put a line break after each line:

<t:loop ...>
  ${currentRow} <br/>
</t:loop>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to