nl2br  does job well. Thanks all.


On Feb 13, 11:29 pm, Mike Orr <[email protected]> wrote:
> On Sat, Feb 13, 2010 at 7:50 AM, [email protected]
>
> <[email protected]> wrote:
> > Where I can find the web helper documentation?
>
> > I want to use the simple_format to convert the newline to <br>.
>
> > is simple_format supported in webhelpers? (I see it was part of rails
> > but could not locate which package simple_format resides)
>
> The rails helpers were replaced with a new set of helpers that do
> pretty much the same thing, although there may be some differences in
> the details. To just convert newlines to <br>, use
> ``webhelpers.html.converters.nl2br``. There are other helpers in that
> package that do that and more.  ``format_paragraphs`` converts text
> paragraphs to HTML.  ``markdown`` and ``textilize`` convert two
> wiki-like languages to HTML.
>
> The rails helpers were removed because they concatenated strings
> rather than using an HTML tag builder, which led to mis-escaping. They
> were also not very pythonic in their names and arguments.  They can
> still be found in WebHelpers 0.6.4, which is on PyPI.
>
> --
> Mike Orr <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to