Re: #21951 [Opn]: IT.php (HTML_Template_IT)

From: Date: Thu, 30 Jan 2003 17:05:04 +0000
Subject: Re: #21951 [Opn]: IT.php (HTML_Template_IT)
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-12849@lists.php.net to get a copy of this message
wima@tiscalinet.ch wrote:
ID:               21951
User updated by: wima@tiscalinet.ch
Reported By:      wima@tiscalinet.ch
Status:           Open
Bug Type:         PEAR related
Operating System: Windows, Linux
PHP Version:      4.2.3
New Comment: There is another bug: $tpl = new HTML_Template_IT(_TEMPLATE_DIR); $tpl->setTemplate('{ANTWORT}'); $tpl->setVariable(array( "ANTWORT" => 'aa{bb}cc' )); $tpl->parse(); $tpl->show(); displays aacc. Where is the {bb}? Previous Comments: ------------------------------------------------------------------------ [2003-01-29 14:29:45] wima@tiscalinet.ch Hello I have a variable with the string =$A3*B$2 I add this to my Template with setVariable(). Then I parse the Template with parse(). And then I display it with show(). The string shows as =$A3*B Where is the $2? I fixed this Bug in the parse-function: line 462: $values[] = addcslashes($this->variableCache[$allowedvar],'$'); I think, this Bug is in line 452 too: $values[] = addcslashes($value,'$'); Can anyone fix this in the repository? Thank you very much! Marco ------------------------------------------------------------------------ I think you should use 2-nd option parameter on method:
boolean HTML_Template_IT::loadTemplatefile (string $filename [, boolean $removeUnknownVariables [, boolean $removeEmptyBlocks]]) You should set $removeUnknownVariables to false.

« previous php.pear.dev (#12849) next »