[PEAR] IT Logic Error?
by Adam Morton other posts by this author
Oct 7 2002 6:02PM messages near this date
[PEAR] ITX Sample code & Tutorial
|
[PEAR] [ANNOUNCEMENT] Translation-1.2 (beta) Released.
I'm not sure if there is a way to fix this or if I'm using the class
incorrectly but...when replacing a variable in a block with a string that
contains a "variable-like" sub-string, IT attempts to replace this. This
causes some wierd show/hide block logic and can allow arbitrary input from
a form to "break" your template.
Example:
[code]
$replacements["NAME"] = "Hi I am {BOB}. I like to write my name like {BOB}";
$template = "<!-- BEGIN block1 --> {NAME}<!-- END block1 -->";
$tpl-> setVariable($replacements);
$tpl-> setTemplate($template, TRUE, TRUE);
$tpl-> show();
[/code]
---------------------------------
Adam Morton
Developer - Web Technology Group
Appalachian State University
http://phpwebsite.appstate.edu
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|