#21397 [Opn]: magic_quotes? or some thing is wrongfully modifying specific strings
ID: 21397
User updated by: danlo@danlo.com
Reported By: danlo@danlo.com
Status: Open
Bug Type: Unknown/Other Function
Operating System: FreeBSD 4.6 Stable
PHP Version: 4.3.0
New Comment:
Thank you for your time, if you have any questions about the script, or
need to see it run on our system, please feel free to contact me.
-daniel
Previous Comments:
------------------------------------------------------------------------
[2003-01-03 14:28:16] danlo@danlo.com
Something about magic_qoutes (or the URL=>_GET) is adding extra '>' in
specific situations. (As if it was trying to close the tags.) For
example (magic quotes on).
Input $_GET has
<[< <[><
<-< <-><
And in addition the ,"\n\n<br>" seams to be adding its own '>'.
A script showing this problem is below:
<html>
<body>
<?php
if ($_GET['text']) echo "You posted this string:
",$_GET['text'],"\n\n<br>";
echo "\n";
if ($_GET['text']) echo "htmlentities returns:
",htmlentities($_GET['text']),"\n<br>";
?>
<form method=get action="<?php echo $HTTP_SERVER_VARS['PHP_SELF'];
?>">
<input type=text name=text value="<[<">
<input type=submit value="Try this">
</form>
<form method=get action="<?php echo $HTTP_SERVER_VARS['PHP_SELF'];
?>">
<input type=text name=text value="a<=b">
<input type=submit value="Try this">
</form>
</body>
</html>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21397&edit=1
Thread (6 messages)