Re: Converting newlines to <br /> tags

Richard Thomas <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <[email protected]>
> <td>[% b.affiliations.0 | html || "&nbsp;"  %]</td>
> or
> <td>[% (b.affiliations.0 | html) || "&nbsp;"  %]</td>
> does not work; I get a parse error in both cases.
> 
> I could just go back to HTML.escape() and in this case I have no need for the html_line_break ... but if I ever needed both the &nbsp thing as well as the line break thing, how could that be done?

Perhaps something like:

	<td>[% v = b.affiliations.0 | html; v || '&nbsp;' %]</td>

cheers
RET
_________________________________________________________
If you receive an email from the Health Department, saying that if you eat
tinned pork you will contract swine flu, delete it because it is spam.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.