From:             kasparsj at gmail dot com
Operating system: 
PHP version:      5.2.8
PHP Bug Type:     DOM XML related
Bug description:  saveHTML automatically replaces unicode letters to entities

Description:
------------
DOMDocument->saveHTML replaces not only predefined entities, but also
unicode letters, like ā, š, ē. is this also as expected or a bug?

this is related to:
http://bugs.php.net/bug.php?id=37878

Reproduce code:
---------------
$doc = new DOMDocument('1.0', 'UTF-8');
$doc->substituteEntities = false;
$doc->appendChild($doc->createElement('p', 'šaēeā'));
var_dump($doc->saveHTML());

Expected result:
----------------
<p>šaēeā</p>

Actual result:
--------------
<p>&copy;&scaron;a&#275;e&#257;</p>

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

Reply via email to