[Twisted-web] [Nevow] how to generate XHMTL without whitespaces

Phil Mayers p.mayers at imperial.ac.uk
Tue Sep 26 17:39:12 CDT 2006


Manlio Perillo wrote:
> 
> this template:
> 
>       <label>label:
>         <select name="a_name" n:render="sequence"
>                 n:data="a_list">
>           <option n:pattern="item">
>             <n:invisible n:render="string" n:data="0" />
>             <n:attr name="label" n:render="string" n:data="1" />
>           </option>
>         </select>
>       </label>

> gives a:
> 
>       <label>label:
>         <select name="a_name"><option label="a_label">
> 
>             1
> 
>           </option><option label="another_label">

Erm - yes. Because your template has whitespace in it. Remove it and it 
should work - that is:

<label>label:<select name="a_name" n:render="sequence" 
n:data="a_list"><option n:pattern="item">...



More information about the Twisted-web mailing list