[Templates] A bug and a suggestion OMG!

Rodney Broom rbroom at rbroom.com
Fri Jan 25 18:07:18 GMT 2008


Oh, heh, html_filter() is pretty thin.

...told I might be missing something.

---
Rodney Broom

----- Original Message ----- 
From: "Sean McAfee" <eefacm at gmail.com>
To: "Rodney Broom" <rbroom+tt2 at rbroom.com>
Cc: <templates at template-toolkit.org>
Sent: Friday, January 25, 2008 10:54
Subject: Re: [Templates] A bug and a suggestion OMG!


> On Jan 25, 2008 9:45 AM, Rodney Broom <rbroom+tt2 at rbroom.com> wrote:
> 
>> From: "Tosh Cooey" <tosh at 1200group.com>
>>
>> > "This isn't working"
>> >
>> > Needs to come out as:
>> >
>> > &quot;This isn&apos;t working&quot;
>>
>> Unless I'm missing something:
>>
>>  [% var_to_escape | html %]
>>
> 
> The point is that the html filter doesn't do apostrophes.  Example:
> 
> $ perl -MTemplate -le 'Template->new->process(\"[% x | html %]", { x =>
> shift })' '"This isn'\''t working"'
> &quot;This isn't working&quot;
> 
> 
> --Sean
>



More information about the templates mailing list