Re: [PHP-MIGRATION] Escaping from HTML / incompatibilities
[email protected] (Ben Peter) Thu, 8 Jun 2000 10:44:55 +0200 (CEST)
| Newsgroups | php.migration |
|---|---|
| Message-ID | <Pine.LNX.4.21.0006081036530.6822-100000@frws007.zentropypartners.de> |
Stan,
thank you very much for your answer.
ok, I cannot reproduce the problem as I carelessly played around without
saving in between, but it may have been a netscape caching problem.
Anyway: playing around I found that the trans-sid feature cannot
handle this. These are code and outout of a simple test page (see output
of 2nd <a>.
========
THE PAGE
========
<?
class test {
var $foo;
var $bar;
}
if (!isset($t)) {
$t = new test();
$t->foo=1;
}
//session_register("t");
//$t->foo++;
?>
Counter is <? echo $t->foo ?>
<? echo "<A HREF=\"" .$SCRIPT_NAME."\">Counter++</A>" ?>
<A HREF="<? echo $SCRIPT_NAME ?>">Counter++</A>
======
OUTPUT
======
[bpeter@frws007 bpeter]$ lynx --source http://frws054:83/index.php
Counter is 1<A
HREF="/index.php?PHPSESSID=dd5ab0d0ccd55cca97769d85eb1103a9">Counter++</A>
<A
HREF="?PHPSESSID=dd5ab0d0ccd55cca97769d85eb1103a9"/index.php">Counter++</A>
[bpeter@frws007 bpeter]$
But this is probably the wrong place for this...
Thanks for your help,
Ben
On Thu, 8 Jun 2000, Stanislav Malyshev wrote:
> BP>> Does PHP4 no longer allow to escape from HTML within an HTML tag? This
>
> Why not? It does.
>
> BP>> obviously would be stricter where SGML/XML is concerned, but should be
> BP>> listed under 'incompatibilities' on php.net/version4/ as it is a widely
> BP>> used, if undocumented, feature of php3.
> BP>>
> BP>> Example:
> BP>>
> BP>> Code line and results
> BP>>
> BP>> <A HREF="<? echo $SCRIPT_NAME ?>">go</A>
> BP>>
> BP>> PHP3: <A HREF="/mypage.php">go</A>
> BP>> PHP4: <A HREF="">go</A>
>
> Maybe you just don't have this variable set for some reason?
> This should work in PHP 4 as well.
>
--
Benjamin Peter
Zentropy Partners GmbH
ph. +49-69-96244-395
pax +49-69-96244-244
http://www.zentropypartners.com
"Integrate the building and marketing of digital businesses"