Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.13

Bug #90 Whitespace Trailing Substitution Eaten
Submitted: 2003-10-13 02:04 UTC
From: mitch at enetis dot net Assigned:
Status: Wont fix Package: HTML_Template_Flexy
PHP Version: 4.3.3 OS: debian linux
Roadmaps: (Not assigned)    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2003-10-13 08:44 UTC
Package:
Bug Type:
Summary:
From: mitch at enetis dot net
New email:
PHP Version: Package Version: OS:

 

 [2003-10-13 02:04 UTC] mitch at enetis dot net
Description: ------------ Newlines following a {variable} disappear after substitution. This is not a big deal when generating HTML, obviously, but one sees it if one is using a template to make plain text, such as for an email. Use the following two lines for template.text in the reproduce code: W{foo} {bar}Z Later, - Mitch Reproduce code: --------------- <? require_once 'HTML/Template/Flexy.php'; $obj = new StdClass; $obj->foo = 'X'; $obj->bar = 'Y'; $options = array('templateDir' => '.', 'compileDir' => '.', 'compiler' => 'Standard'); $output = new HTML_Template_Flexy($options); $output->compile('template.text'); $output->outputObject($obj); ?> Expected result: ---------------- WX YZ Actual result: -------------- WXYZ

Comments

 [2003-10-13 02:18 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2003-10-13 08:44 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-11-11 05:09 UTC] john at curioussymbols dot com
(1) You need to use capital 'm' in 'mail' as follows: $x = new HTML_Template_Flexy(array( 'compiler'=>'Regex', 'filters' => array('SimpleTags', 'Mail'), )); (2) This Regex/SimpleTags/Mail compiler gives funny output, and I end up with blanks going in to my template: Template: --------- I am interested in purchasing your {producttypename} named {productname}, Compiled Template: ------------------ I am interested in purchasing your <?=htmlspecialchars(@$producttypename)?> named <?=htmlspecialchars(@$productname)?>, Output: ------- I am interested in purchasing your named ,.