#21951 [Bgs]: IT.php (HTML_Template_IT)
| From: | wima at tiscalinet dot ch | Date: | Thu, 30 Jan 2003 12:16:26 +0000 |
| Subject: | #21951 [Bgs]: IT.php (HTML_Template_IT) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-12843@lists.php.net to get a copy of this message | ||
ID: 21951
User updated by: wima@tiscalinet.ch
Reported By: wima@tiscalinet.ch
Status: Bogus
Bug Type: PEAR related
Operating System: Windows, Linux
PHP Version: 4.2.3
Assigned To: pajoye
New Comment:
But I have Unknown Variables and I want remove them :-(
Previous Comments:
------------------------------------------------------------------------
[2003-01-30 05:50:48] pajoye@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
Hello,
Both are normal behiavors. For you 2nd problem, try this:
$tpl = new HTML_Template_IT();
$tpl->setTemplate($template, TRUE, TRUE);
$tpl->removeUnknownVariables = false;
$tpl->setVariable($vars);
$tpl->show();
The 1st problem can be solved using the addcslashed()before assigning
values. That may be added to the documentation as a link to the preg
pattern replacement rules, I'll do it later.
Thank's for your report,
pierre
------------------------------------------------------------------------
[2003-01-30 00:26:17] wima@tiscalinet.ch
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}?
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21951&edit=1