Skip to content

Commit

Permalink
Docs: add note that nl2br does not escape HTML (from Disqus comment b…
Browse files Browse the repository at this point in the history
…y ft)
  • Loading branch information
Peter Hilton committed May 28, 2011
1 parent 1987a8f commit a1cfafc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions documentation/manual/javaextensions.textile
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ Replaces new-line characters with HTML **br** tags. Returns: **String**.
bc. ${"one\ntwo".nl2br()}
one<br/>two

Note that the output is not HTML-escaped, so that the **br** tag is not escaped in the output. This means that you probably want to use "escape()":#escape for user input:

bc. ${userInput.escape().nl2br()}


h3. <a name="raw">raw()</a>

Expand Down

0 comments on commit a1cfafc

Please sign in to comment.