| View previous topic :: View next topic |
| Author |
Message |
CuppoJava
Joined: 02 Jun 2008 Posts: 1
|
Posted: Mon Jun 02, 2008 11:59 pm Post subject: Preserve Backslashes? HTML_Template_IT |
|
|
Hi,
I'm using HTML_Template_IT package in my program, and I need for the package to preserve my strings with the backslashes.
ie. don't treat them as escape characters.
in the example below
$user->getFirstName() returns "\\\\\\\\\\\\\\\\\\\\\"
but the template only displays "\\\\\\\\"
$opt = array('preserve_data' => true, 'use_preg'=>false);
$template = new HTML_Template_IT("./templates", $opt);
$template->loadTemplatefile("ProfilePanel.tpl", true, false);
$template->setCurrentBlock("MAIN");
$template->setVariable("FIRSTNAME", $user->getFirstName());
I thought preserve_data would have worked. But it didn't and now I'm quite stuck. Thanks a lot for your help.
-Cuppo |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|