However I've known this post:

According to this way, "structure" keyword is necessary at every time.
tal:content="structure toHTML:var" ...seems bit complex.
Our designers might not accept so unnatural things.

We have many free text fields including newline.
When "line 1\n<b>line 2</b>" is given, I want these two results:

  ==> line 1<br />&lt;b&gt;line 2&lt;/b&gt;

  pal:content-nl2br="structure var"
  ==> line 1<br /><b>line 2</b></p>

This is most consistent answer, I thought.

> Why not just have tal:content="nl2br: var"
> Just define phptal_tales_nl2br() and voila :)

Hisateru Tanaka

PHPTAL mailing list

Reply via email to