ID: 12120
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: 
Status: Feedback
Bug Type: Strings related
Operating System: Linux Mandrake
PHP Version: 4.0.4pl1
New Comment:

Does this happen with PHP 4.0.6?


Previous Comments:
------------------------------------------------------------------------

[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 "&lt; &lt; 
&lt;") 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>"


------------------------------------------------------------------------

[2001-07-12 20:32:58] [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 "&lt; &lt; 
&lt;") 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>"
hout 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>"


------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=12120&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to