Date: 06/04/01
- Next message: Forrest J Cavalier III: "RE: [phplib] Bugs in table.inc ?"
- Previous message: Chris Johnson: "RE: [phplib] Bugs in table.inc ?"
- In reply to: Chris Johnson: "RE: [phplib] Bugs in table.inc ?"
- Next in thread: Dima Nemchenko: "[phplib] Re: odd behaviour when parse()-ing a block"
- Reply: Dima Nemchenko: "[phplib] Re: odd behaviour when parse()-ing a block"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all,
I wonder if anyone has had this same problem and, if so, could explain it
to me. I'm using PHP Version 4.0.5 and PHPLib 7.2b, though I've modified
template.inc:
diff -uNr ~/template.inc ~/php/template.inc
--- /home/myhomepageonline/template.inc Mon Jun 4 14:04:33 2001
+++ /home/myhomepageonline/php/template.inc Mon Jun 4
14:02:43 2001
@@ -106,7 +106,10 @@
$str = $this->get_var($parent);
$reg = "/<!--\s+BEGIN $handle\s+-->(.*)<!--\s+END
$handle\s+-->/sm";
preg_match_all($reg, $str, $m);
- $str = preg_replace($reg, "{$name}", $str);
+# $str = preg_replace($reg, "{$name}", $str);
+# 2001-05-30, dn <email protected>
+# q.v.
http://www.phpbuilder.com/mail/phplib-list/2000071/0108.php
+ $str = preg_replace($reg, "{"."$name}", $str);
$this->set_var($handle, $m[1][0]);
$this->set_var($parent, $str);
}
I've got a block in the main template, which is parsed twice, with two
different templates substituted for the block item. Everything works ok,
but...
Looking at the source, I see that all the HTML "entities" from the second
template, like "<" and " l", have been translated into "plain" ASCII
characters, like "<" and " ". This doesn't happen in the first template, or
if I parse without appending.
Has anyone else seen this?
Thanks in advance for all your time,
--:D_ima Dima Nemchenko <Dima.Nemchenko <email protected>>
"Open source code is like lobster--most people who haven't tried it don't like the way it looks. But those who try it, love it."
- Next message: Forrest J Cavalier III: "RE: [phplib] Bugs in table.inc ?"
- Previous message: Chris Johnson: "RE: [phplib] Bugs in table.inc ?"
- In reply to: Chris Johnson: "RE: [phplib] Bugs in table.inc ?"
- Next in thread: Dima Nemchenko: "[phplib] Re: odd behaviour when parse()-ing a block"
- Reply: Dima Nemchenko: "[phplib] Re: odd behaviour when parse()-ing a block"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

