Re: [Templates] A bug and a suggestion OMG!

2008-01-30 Thread Mihai Bazon
I guess someone will soon be asking why it doesn't encode "A" to "A". :-p My point is, the apostrophe is _usually_ safe in HTML and I'm thankful for the filter doesn't encode it. If I ever want to translate it to "'", it's too easy to write my own filter. -M. Tosh Cooey wrote: > Ha ha! I have

Re: [Templates] A bug and a suggestion OMG!

2008-01-30 Thread Rodney Broom
Oh, heh, html_filter() is pretty thin. ...told I might be missing something. --- Rodney Broom - Original Message - From: "Sean McAfee" <[EMAIL PROTECTED]> To: "Rodney Broom" <[EMAIL PROTECTED]> Cc: Sent: Friday, January 25, 2008 10:54 Subject: Re: [T

Re: [Templates] A bug and a suggestion OMG!

2008-01-30 Thread Rodney Broom
From: "Tosh Cooey" <[EMAIL PROTECTED]> > "This isn't working" > > Needs to come out as: > > "This isn't working" Unless I'm missing something: [% var_to_escape | html %] --- Rodney Broom ___ templates mailing list templates@template-toolkit.org

Re: [Templates] A bug and a suggestion OMG!

2008-01-25 Thread Rodney Broom
Oh, heh, html_filter() is pretty thin. ...told I might be missing something. --- Rodney Broom - Original Message - From: "Sean McAfee" <[EMAIL PROTECTED]> To: "Rodney Broom" <[EMAIL PROTECTED]> Cc: Sent: Friday, January 25, 2008 10:54 Subject: Re: [T

Re: [Templates] A bug and a suggestion OMG!

2008-01-25 Thread Simon Wistow
On Fri, Jan 25, 2008 at 09:54:19AM -0800, Sean McAfee said: > The point is that the html filter doesn't do apostrophes. The html_entity filter does though http://www.tt2.org/docs/manual/Filters.html#section_html_entity ___ templates mailing list te

Re: [Templates] A bug and a suggestion OMG!

2008-01-25 Thread Sean McAfee
On Jan 25, 2008 9:45 AM, Rodney Broom <[EMAIL PROTECTED]> wrote: > From: "Tosh Cooey" <[EMAIL PROTECTED]> > > > "This isn't working" > > > > Needs to come out as: > > > > "This isn't working" > > Unless I'm missing something: > > [% var_to_escape | html %] > The point is that the html filter doe

Re: [Templates] A bug and a suggestion OMG!

2008-01-25 Thread Rodney Broom
From: "Tosh Cooey" <[EMAIL PROTECTED]> > "This isn't working" > > Needs to come out as: > > "This isn't working" Unless I'm missing something: [% var_to_escape | html %] --- Rodney Broom ___ templates mailing list templates@template-toolkit.org

Re: [Templates] A bug and a suggestion OMG!

2008-01-25 Thread Tosh Cooey
Ha ha! I have just come across a situation where I'm being bitten by the same problem. I need to filter the ' or single quote, or apostrophe. "This isn't working" Needs to come out as: "This isn't working" But how, in an elegant way that doesn't require editing HTML::Entities or creating my

Re: [Templates] A bug and a suggestion

2008-01-24 Thread Sean McAfee
On Jan 23, 2008 10:12 PM, Kelly Thompson <[EMAIL PROTECTED]> wrote: > I concur. > > > Other than that, I lOVE TT. Really. > One more thing, you mentioned in the badger book, about creating your own > virtual methods, but you didn't show how to "use" them. > > For instance, I wanted to add substr t

Re: [Templates] A bug and a suggestion

2008-01-23 Thread Kelly Thompson
I concur. Other than that, I lOVE TT. Really. One more thing, you mentioned in the badger book, about creating your own virtual methods, but you didn't show how to "use" them. For instance, I wanted to add substr to a formating issue I had. use Template::Stash; $Template::Stash::LIST_OPS->{get

Re: [Templates] A bug and a suggestion

2008-01-23 Thread Sean McAfee
On Jan 19, 2008 3:33 AM, Andy Wardley <[EMAIL PROTECTED]> wrote: > Hi Sean, > > > ok( $text =~ /"back is " . '#ff'/, 'col.back folded' ); > > Oops! Mea Culpa. > > > I think prototypes aren't generally a good idea, so I'd go for the > latter > > approach. > > Sounds good. > > > I'd like to > >

Re: [Templates] A bug and a suggestion

2008-01-19 Thread Andy Wardley
Hi Sean, > ok( $text =~ /"back is " . '#ff'/, 'col.back folded' ); Oops! Mea Culpa. > I think prototypes aren't generally a good idea, so I'd go for the latter > approach. Sounds good. > I'd like to > propose that generated code declare only lexical variables whose names > are prefixed

Re: [Templates] A bug and a suggestion

2008-01-18 Thread Paul LeoNerd Evans
On Fri, 18 Jan 2008 11:54:18 -0800 "Sean McAfee" <[EMAIL PROTECTED]> wrote: > ok( $text =~ /"back is " . '#ff'/, 'col.back folded' ); > > The problem here is that the matching is performed in list context, so if it > fails, ok receives only a single argument, the string 'col.back folded', > w

[Templates] A bug and a suggestion

2008-01-18 Thread Sean McAfee
In the course of translating the Template Toolkit into Python, I accumulated a small(ish) list of issues I noticed with the Perl version. Most are minor--documentation issues and the like--but a few are more serious. Here's one of them, from t/constants.t: ok( $text =~ /"back is " . '#ff'/, '