durusmail: quixote-users: Documenting the HTML template feature of PTL
Documenting the HTML template feature of PTL
2003-01-05
2003-01-05
Documenting the HTML template feature of PTL
Tom Jenkins
2003-01-05
Neil Schemenauer wrote:
> On Sat, Jan 04, 2003 at 06:01:59PM -0800, Titus Brown wrote:
>
>>I think you're saying that strings are automatically htmlescape()d
>>unless explictly run through the 'htmltext' function, yes?
>
>
> No.  Literal strings in [html] template functions are htmltext
> instances.  The need for explictly using htmltext only appears when HTML
> markup comes from outside the template.  For example, if you want to
> include a file containing HTML:
>
>     def foo [html] ():
>         '' # does not get escaped
>         htmltext(open("myfile.html").read())
>         ''
>
> I hope that clears it up.  More explaination should definitely be added
> to the docs.
>

AHHH... now I understand what was said.  Include the above example in
the docs, please.  It explains things quite simply.

Tom




reply