From:             stu-php at better dot domain dot name
Operating system: Windows Server 2003
PHP version:      5.0.0b4 (beta4)
PHP Bug Type:     Strings related
Bug description:  strip_tags() doesn't fail on incomplete tag if there is non-html 
output before.

Description:
------------
I have discovered that strip_tags() does not fail with an error if used on
a string with an incomplete tag IF there is any non-tag text BEFORE the
incomplete tag.

Reproduce code:
---------------
http://better.domain.name/php/strip.php

There's a link to the source on the page above showing the bug.

Expected result:
----------------
I would expect strip_tags() to fail if there is an incomplete html tag in
the string passed to it, regardless of other input before, or after, the
tag.



"This function tries to return a string with all HTML and PHP tags
stripped from a given str. It errors on the side of caution in case of
incomplete or bogus tags." - http://php.net/strip_tags

Actual result:
--------------
Only errors if there is no plain text before the broken tag.

-- 
Edit bug report at http://bugs.php.net/?id=27361&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27361&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27361&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27361&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27361&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27361&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27361&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27361&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27361&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27361&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27361&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27361&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27361&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27361&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27361&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27361&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27361&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27361&r=float

Reply via email to