From:             
Operating system: Archlinux
PHP version:      5.3.10
Package:          XML related
Bug Type:         Bug
Bug description:xml_parse with invalid attribute returns 1; while xmlwf throws 
an error

Description:
------------
Html with an invalid attribute should make xml_parse return 0, instead of
1

For as far as I can see, xml_* is based on expat. Expat supplies xmlwf, so
I 
confirmed checked what xmlwf would return for the xml. I found that xmlwf
behaves 
correctly.

------

[sjon@sjon-desktop ~]$ xmlwf 
<?xml version="1.0" encoding="UTF-8" ?>
<img src="http://i.mg/"; title="a\"b" />
STDIN:2:34: not well-formed (invalid token)


Test script:
---------------
$p = xml_parser_create('UTF-8');
$html = '<img src="http://i.mg/"; title="a\"b" />';
var_dump(xml_parse($p, $html));

Expected result:
----------------
0

Actual result:
--------------
1

-- 
Edit bug report at https://bugs.php.net/bug.php?id=61542&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=61542&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=61542&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=61542&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=61542&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61542&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=61542&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=61542&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=61542&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=61542&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=61542&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=61542&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=61542&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=61542&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=61542&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=61542&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=61542&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=61542&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=61542&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=61542&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=61542&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=61542&r=mysqlcfg

Reply via email to