IT Logic Error?

From: Date: Mon, 07 Oct 2002 18:02:59 +0000
Subject: IT Logic Error?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2455@lists.php.net to get a copy of this message
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

« previous php.pear.general (#2455) next »