Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Alex Teslik
On Wed, 06 Apr 2011 15:21:13 -0400, Michael Peters wrote This email is an announcement of sorts for some work I've got planned for HTML::Template. I'm greatly in debt to Sam Tregar for this module and the use that I've gotten out it over the years. After talking with Sam, he's given me

Re: [htmltmpl] Suggested Addition

2010-07-05 Thread Alex Teslik
I would love to see this feature. Supporting TMPL_IF and supporting TMPL_ELSE but not supporting TMPL_ELSIF seems very bizarre to me. Just sayin. Mat, if you could share your patch that adds this feature that would be great. Thanks, Alex On 3 July 2010 01:52, Alan Laas

Re: [htmltmpl] HTML::Template Loop Issue

2010-04-08 Thread Alex Teslik
On Thu, 8 Apr 2010 17:20:36 -0400, Shawn Scott wrote Good Afternoon, I have been using HTML::Template for some time and have recently run into an starnge issue. I have the following code my @error = @_; my @error_loop = (); my %error_data; print header; foreach (@error) {

Re: [htmltmpl] Nested templates

2009-11-25 Thread Alex Teslik
On Tue, 24 Nov 2009 21:24:30 -0500, Brad Baxter wrote Hi all, I once tried to implement nested templates with HTML::Template. Below is an example of what I came up with: 1 #!/usr/local/bin/perl 2 3 use strict; 4 use warnings; 5 use HTML::Template; 6

[htmltmpl] 2.9 loops broken?

2008-04-14 Thread Alex Teslik
Hello, I am trying to perform an inner/outer loop with global_vars set, as shown in the H:T man page: # test.tmpl - from the man page -- TMPL_LOOP OUTER_LOOP OUTER: TMPL_VAR OUTER_VAR TMPL_LOOP INNER_LOOP INNER: TMPL_VAR INNER_VAR INSIDE OUT: TMPL_VAR OUTER_VAR

Re: [htmltmpl] 2.9 loops broken?

2008-04-14 Thread Alex Teslik
On Mon, 14 Apr 2008 18:03:53 +0100, Roger Burton West wrote On Mon, Apr 14, 2008 at 07:38:03AM -0800, Alex Teslik wrote: $template-param( OUTER_LOOP = [ { OUTER_VAR = 'I AM THE OUTER VAR' }, { INNER_LOOP

Re: [htmltmpl] Sanitizing data against HTML::Template tags

2008-03-27 Thread Alex Teslik
Yes, you are forgetting all the closing tags. Another option would be to just eval the code as passed to a test HT object. If it breaks HT you can catch it from the eval. HTH, Alex On Thu, 27 Mar 2008 04:43:41 -0600, Justin Simoni wrote Here's one for everyone: I'm receiving data from

Re: [htmltmpl] HTML::Template escaping squashes HTML entities

2008-03-20 Thread Alex Teslik
Alex Teslik wrote: Hello, I'm developing an app where there are some strings that have HTML entities in them, such as: This is a T#233;st These strings need to go into a template that is displayed in the iso-8859-1 character set. These strings need to be html escaped so

Re: [htmltmpl] HTML::Template escaping squashes HTML entities

2008-03-20 Thread Alex Teslik
On Wed, 19 Mar 2008 22:24:36 -0500, Karen wrote On 3/19/08, Alex Teslik [EMAIL PROTECTED] wrote: But then I can no longer do all my escaping in the template. Well, you're effectively handing it a half-escaped string. That's kind of a special case. I disagree. The string I'm giving

[htmltmpl] HTML::Template escaping squashes HTML entities

2008-03-19 Thread Alex Teslik
Hello, I'm developing an app where there are some strings that have HTML entities in them, such as: This is a T#233;st These strings need to go into a template that is displayed in the iso-8859-1 character set. These strings need to be html escaped so that the quotes don't break things. When

Re: [htmltmpl] Addendum/Correction to: Template output for email scripts adding extra line breaks

2007-12-19 Thread Alex Teslik
On Wed, 19 Dec 2007 14:02:59 +0100, Rhesa Rozendaal wrote There's a conflict between indenting your template for readability, and the amount of whitespace that ends up in the output. Very well put! I beat this horse more deader a while back (and someone before me beat it dead too):

Re: [htmltmpl] Addendum/Correction to: Template output for email scripts adding extra line breaks

2007-12-15 Thread Alex Teslik
My two guesses (I havn't tried any code): - the template file contains both \n and \r courtesy of your text editor and perhaps unbeknownst to you. The \r is getting expanded to an extra \n. Run the template file through unix2dos or an equivalent command to eliminate the extra line endings. - the

Re: [htmltmpl] Numeric loops

2007-04-30 Thread Alex Teslik
my $ratingloop = [ map { {RATING = $_} } (1..$ratingmax) ]; or something like that (untested). The effort seems pointless until the flexibility is used by the template designer to do something special at each rating... or something else no one has thought of yet. I'd go with the loop. TMPL_FOR

[htmltmpl] extra whitespace

2006-02-08 Thread Alex Teslik
Hello, Is there a switch (feature request?) that will tell HTMLTMPL to replace a TMPL followed by [\n\r]+ with nothing - even better replace the whole line if the only thing on the line is a TMPL tag? Currently, the TMPL tags are removed, but the \n or \r that trail them are not. The result is

Re: [htmltmpl] extra whitespace

2006-02-08 Thread Alex Teslik
On Wed, 8 Feb 2006 14:30:16 -0700 (GMT-07:00), Mark A. Fuller wrote I raised this issue a year or two ago and it wasn't well-received. Hi Mark, I completely agree that the filter option is an excellent feature, but I'm not certain it is the right feature to use for stripping linefeeds. I am