Re: Converting newlines to <br /> tags
Bill Ward <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <CAKGT8WrqOOjhzBzF-fYvb_r_c=Ravd8VR=mXmSvE_3oGbwrR+g@mail.gmail.com> |
On Sun, Feb 12, 2012 at 8:05 PM, Richard Thomas <[email protected]> wrote: > > <td>[% b.affiliations.0 | html || " " %]</td> > > or > > <td>[% (b.affiliations.0 | html) || " " %]</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   thing as > well as the line break thing, how could that be done? > > Perhaps something like: > > <td>[% v = b.affiliations.0 | html; v || ' ' %]</td> > > Yep, that works! Thanks. -- Check out my LEGO blog at http://www.brickpile.com Follow/friend me: facebook.com/billward • flickr.com/photos/billward • twitter.com/williamward _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates