ID: 12120 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Verified +Status: Closed Bug Type: Strings related Operating System: Linux Mandrake PHP Version: 4.3.0CVS New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-01-22 07:54:04] [EMAIL PROTECTED] Version update ------------------------------------------------------------------------ [2002-01-22 07:31:02] [EMAIL PROTECTED] I reproduced the problem in PHP 4.1.1, using the same code: $foo = strip_tags("< < <b>hello</b>", "<b>"); echo $foo; // prints "< b>hello" with a hidden "</b>" Tested on Windows XP and Linux 2.4 ------------------------------------------------------------------------ [2001-08-19 13:31:23] [EMAIL PROTECTED] I did not try with the newest release, and unfortunatly cannot currently test more with any version (different computer, not suitable for PHP.) Sorry I could not help. Do note, though, that I have been to many, many sites who use PHP, to look into what their solution is to striptags(), and all the sites seem to use a custom function. Obviously, I am not the only one to have this problem (again, as far as 4.0.4pl1 is concerned.) ------------------------------------------------------------------------ [2001-08-19 05:00:02] [EMAIL PROTECTED] Does this happen with PHP 4.0.6? ------------------------------------------------------------------------ [2001-07-12 21:54:40] [EMAIL PROTECTED] $foo = strip_tags("< < <b>hello</b>", "<b>"); echo $foo; // prints "< b>hello" with a hidden "</b>" strip_tags(), in this case, returns the string it was supplied, but omits the second and third '<' character. In a regular browser, it would display the 3 '<' characters, seperated by spaces: "< < <" (equivalent to "< < <") followed by a bold hello. Yet since PHP probably raises a flag after the first "<", all subsequent "<" characters are ignored until the next ">". To resume: Source witSource without strip_tags: "< < <b>hello</b>" Source with strip_tags: "< b>hello</b>" I would also like to point out: $foo = strip_tags("< < < >hello</b>", "<b>"); echo $foo; Source without strip_tags: "< < < >hello</b>" Source with strip_tags: "hello</b>" ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/12120 -- Edit this bug report at http://bugs.php.net/?id=12120&edit=1