tags:

views:

9

answers:

1

I have a DTML document which only contains:

<dtml-var public_blast_results>

and displays when i view it as:

YP_001336283    100.00    345    0    0     23     367    23     367    0.0    688

When I edit the DTML page for example just adding a header like:

<h3>Header</h3>
<dtml-var public_blast_results>

The "public_blast_results" loeses its formatting and displayes as:

Header
YP_001336283 100.00 345 0 0 23 367 23 367 0.0 688

Is there a way for maintaining the formatting? public_blast_results is a python function which just simply reads the contents of a file and returns it.

+2  A: 

This is nothing to do with DTML - it's a basic issue with HTML, which is that it ignores whitespace. If you want to preserve it, you need to wrap the content with <pre>.

<pre><dtml-var public_blast_results></pre>
Daniel Roseman