From:             email at steffenweber dot net
Operating system: Linux
PHP version:      5.2.1
PHP Bug Type:     Strings related
Bug description:  strip_tags does not handle single quotes correctly 
(regression)

Description:
------------
The fix for bug #40432 (http://bugs.php.net/bug.php?id=40432) seems to
have broken the strip_tags function.

I'm using PHP 5.2.1 and have additionally applied this patch:
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.39&r2=1.445.2.14.2.40&view=patch

Reproduce code:
---------------
<?php
$html = '<span title="Bug \' Trigger">Text</span>';
var_dump(strip_tags($html));
?>

Expected result:
----------------
Prints "Text".

Actual result:
--------------
Prints the empty string.

Notice that the following slightly modified code correctly prints "Text":

<?php
$html = '<span title="Foo">Text</span>';
var_dump(strip_tags($html));
?>

-- 
Edit bug report at http://bugs.php.net/?id=40637&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40637&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40637&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40637&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40637&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40637&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40637&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40637&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40637&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40637&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40637&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40637&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40637&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40637&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40637&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40637&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40637&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40637&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40637&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40637&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40637&r=mysqlcfg

Reply via email to