[PHPTAL] Repeat scope issue

2009-02-27 Thread Richard Cernava
I've noticed that PHPTal places the repeat value variable in the ctx object, which happens to be the same scope as all others assigned to view. This presents a problem when using general names through out your template, here is an example. With in side phptal lets say you have two arrays, $user a

[PHPTAL] Re: Security bug in PHPTAL?

2009-02-27 Thread Richard Cernava
Szymek Przybył writes: > > I done a few sites in PHPTAL. When I today visit one of them - I saw an > error: > > exception 'PHPTAL_Exception' with message 'Invalid element name > 'ohhe.length;qhxk+=3){ifdm+=rkfg(ohhe.substr'' in > /inc/PHPTAL-1.1.14/PHPTAL/Dom/Node.php:107 Stack trace: # etc.

[PHPTAL] disabling PHPTal parsing for blocks

2009-08-06 Thread Richard Cernava
ssing this? Thanks! Richard Cernava ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal

[PHPTAL] Re: Fwd: stripping or escaping php code in templates

2009-08-06 Thread Richard Cernava
Ionut Matei writes: > > > If a template contains php code, it gets into the compiled template and will be executed...I think a pre-filter can be created for stripping php code, but Is there a feature or setting in PHPTAL for preventing executing php code placed inside php tags (e.g. like $php_h

[PHPTAL] Re: Fwd: stripping or escaping php code in templates

2009-08-06 Thread Richard Cernava
Richard Cernava writes: Oh yeah, you do have to filter the attribute values as well because the are allowed to have php in them. ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal

[PHPTAL] Re: disabling PHPTal parsing for blocks

2009-08-07 Thread Richard Cernava
Kornel Lesiński writes: > > On 06-08-2009 at 18:48:46 Richard Cernava wrote: > > > I'm at a loss to find a method to disable PHPTAL parsing for a block of > > XML/HTML. I am aware that there placing anything in a comment removes it > > exempts > >

[PHPTAL] Re: disabling PHPTal parsing for blocks

2009-08-07 Thread Richard Cernava
> > > As a work around perhaps you can place the Javascript template code in separate files and use them like this:  I hate to destroy the elegance of TAL :) I haven't looked into the metal macro library much, I may be able to work somethin

[PHPTAL] PHP newline consumption

2009-08-07 Thread Richard Cernava
Hi, A "feature" of PHP's is to consume a newline when it is following it's closing tag (http://bugs.php.net/bug.php?id=28381). The reason I bring this up is because this issue affects PHPTAL's output. Take for example: I'm on a line I'm on a line this will be converting into: true): ; ?>I'm on

[PHPTAL] Re: disabling PHPTal parsing for blocks

2009-08-07 Thread Richard Cernava
Kornel Lesiński writes: > Indeed, you'll have to pick another namespace (this works since 1.2.0): > > > http://example.com/ns/javascript-tal";> > > > > Currently there's no option to generate TAL-namespaced attributes without > interpreting them. > That is the most graceful solutions I

[PHPTAL] Re: Minification of HTML XHTML

2009-08-14 Thread Richard Cernava
Marco Pivetta writes: > > > echo str_replace(array("\n","\r\n","  ","\t"),"",$template->execute());What about this? :) > 2009/8/13 majk  tab characters are replaced by ? characters in previous mails > I would think a pre-filter would be best, that way your not doing a replace each time you ex

[PHPTAL] Re: Using SetSource and I don't want to cache while in dev mode...

2009-08-14 Thread Richard Cernava
Alister Cameron writes: > > > Folks, > > > Can I force a recache on every page load while I'm in dev mode on a given project? > See setForceReparse(boolean) option http://phptal.org/manual/en/ ___ PHPTAL mailing list PHPTAL@lists.motion-twin.

[PHPTAL] Re: Minification of HTML XHTML

2009-08-14 Thread Richard Cernava
> class removeTabs implements PHPTAL_Filter { > public function filter($source){ My bad it would just be return, the assignment to source is not needed: return preg_replace('/^\t+/m', '', $source); ___ PHPTAL mailing list PHPT

[PHPTAL] Re: PHP newline consumption

2009-12-09 Thread Richard Cernava
> > > > A "feature" of PHP's is to consume a newline when it is following > > it's closing > > tag (http://bugs.php.net/bug.php?id=28381). The reason I bring this > > up is > > because this issue affects PHPTAL's output. Take for example: > > I'm on a line > > I'm on a line > > Thanks. This

[PHPTAL] Re: PHP newline consumption

2009-12-10 Thread Richard Cernava
Kornel Lesiński writes: > > On 09-12-2009 at 23:06:40 Richard Cernava wrote: > > > I hate to bring this back up, but this does not seem to be fixed. I'm > > running PHPTal 1.2.2a1. > > > > inside function prepare() I added the preg_replace underneath $

[PHPTAL] Re: PHP newline consumption

2009-12-10 Thread Richard Cernava
Kornel Lesiński writes: > > On 10-12-2009 at 03:18:56 romtek wrote: > > > This would also be useful for generating plain text email. > > People, please! Stop wasting your time with PHPTAL and plaintext! It's > deliberately *not* supported. > > http://phptal.org/wiki/doku.php/plaintext >

[PHPTAL] Re: PHP newline consumption

2009-12-10 Thread Richard Cernava
Kornel Lesiński writes: > I've fixed newline consumption issue. > > However still I advise against using PHPTAL for plaintext. For example > text in will have & interpreted properly, but it won't make > sense in e-mail. > Thanks, works great! __