[PHP-DEV] PHP 4.0 Bug #8998 Updated: htmlspecialchars() DONT convert a string/array ONCE

2001-03-20 Thread stas

ID: 8998
Updated by: stas
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Strings related
Assigned To: 
Comments:

Works for me. Most proboaly syntax error on user's side.

Previous Comments:
---

[2001-01-30 10:39:24] [EMAIL PROTECTED]
The code in your example does not work due to problems with your string quoting.

$foo = "..";
// This is not a valid string
// PHP generates a parse error after the 2nd quote


Try this code snippet and let me know if it works:


..'."n";
$foo = htmlspecialchars($foo);

print $foo;
// Should output ..

$foo = '..'."n";

print $foo;
// Should output ..
?>


---

[2001-01-30 07:12:39] [EMAIL PROTECTED]
ReEdit...
Please note:

$foo = "..";
$foo = htmlspecialchars($foo);

//now $foo is "& lt;a href="foo"& gt;..& lt;/a& gt;" 

$foo = "..";

//$foo is & lt;a href="foo"& gt;..& lt;/a& gt; 
//although $foo is filled with a new value, $foo converts the string!


---

[2001-01-30 07:10:04] [EMAIL PROTECTED]
Please note:

$foo = "..";
$foo = htmlspecialchars($foo);

//now $foo is ".." 

$foo = "..";

//$foo is .. 
//although $foo is filled with a new value, $foo converts the string!


//sorry, my english is too poor to explain more

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8998&edit=2


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8998 Updated: htmlspecialchars() DONT convert a string/array ONCE

2001-01-30 Thread zak

ID: 8998
Updated by: zak
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Strings related
Assigned To: 
Comments:

The code in your example does not work due to problems with your string quoting.

$foo = "..";
// This is not a valid string
// PHP generates a parse error after the 2nd quote


Try this code snippet and let me know if it works:


..'."\n";
$foo = htmlspecialchars($foo);

print $foo;
// Should output ..

$foo = '..'."\n";

print $foo;
// Should output ..
?>


Previous Comments:
---

[2001-01-30 07:12:39] [EMAIL PROTECTED]
ReEdit...
Please note:

$foo = "..";
$foo = htmlspecialchars($foo);

//now $foo is "& lt;a href="foo"& gt;..& lt;/a& gt;" 

$foo = "..";

//$foo is & lt;a href="foo"& gt;..& lt;/a& gt; 
//although $foo is filled with a new value, $foo converts the string!


---

[2001-01-30 07:10:04] [EMAIL PROTECTED]
Please note:

$foo = "..";
$foo = htmlspecialchars($foo);

//now $foo is ".." 

$foo = "..";

//$foo is .. 
//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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #8998 Updated: htmlspecialchars() DONT convert a string/array ONCE

2001-01-30 Thread lopez

ID: 8998
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Strings related
Description: htmlspecialchars() DONT convert a string/array ONCE

ReEdit...
Please note:

$foo = "..";
$foo = htmlspecialchars($foo);

//now $foo is "& lt;a href="foo"& gt;..& lt;/a& gt;" 

$foo = "..";

//$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] [EMAIL PROTECTED]
Please note:

$foo = "..";
$foo = htmlspecialchars($foo);

//now $foo is ".." 

$foo = "..";

//$foo is .. 
//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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]