PHP 4.0 Bug #8998 Updated: htmlspecialchars() DONT convert a string/array ONCE
| From: | lopez at pepe-lopez dot com | Date: | Tue, 30 Jan 2001 12:12:39 +0000 |
| Subject: | PHP 4.0 Bug #8998 Updated: htmlspecialchars() DONT convert a string/array ONCE | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-45371@lists.php.net to get a copy of this message | ||
ID: 8998
User Update by: lopez@pepe-lopez.com
Status: Open
Bug Type: Strings related
Description: htmlspecialchars() DONT convert a string/array ONCE
ReEdit...
Please note:
$foo = "<a href="foo">..</a>";
$foo = htmlspecialchars($foo);
//now $foo is "& lt;a href="foo"& gt;..& lt;/a& gt;"
$foo = "<a href="foo">..</a>";
//$foo is & lt;a href="foo"& gt;..& lt;/a& gt;
//although $foo is filled with a new value, $foo converts the string!
Previous Comments:
---------------------------------------------------------------------------
[2001-01-30 07:10:04] lopez@pepe-lopez.com
Please note:
$foo = "<a href="foo">..</a>";
$foo = htmlspecialchars($foo);
//now $foo is "<a href="foo">..</a>"
$foo = "<a href="foo">..</a>";
//$foo is <a href="foo">..</a>
//although $foo is filled with a new value, $foo converts the string!
//sorry, my english is too poor to explain more
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8998