[Twisted-web] Problems with the new lines

Mary Gardiner mary-twisted at puzzling.org
Wed Aug 31 05:54:01 MDT 2005

On Wed, Aug 31, 2005, Alberto Trujillo wrote:
> but now what I see is the next result:
> line one<br /> line 2

If you have a look at the source of the page you're downloading, you'll
probably see that what the web browser received was:
    line one&lt;br /&gt;line 2

That is, Nevow has escaped the HTML tag <br /> for you. This is the
default behaviour, to force it to not escape things, see this

Since Nevow is designed to produce XML from Python objects, you may find
that it's a better design to actually split up your string and use
tags.br where you want line breaks, rather than starting to use Nevow to
put tags in some places, but bypassing Nevow and inserting them directly
in other places.


More information about the Twisted-web mailing list