#42391 [Opn]: DOM ignores several valid dtd entities.
| From: | linus dot martensson at elplan-gm dot se | Date: | Wed, 22 Aug 2007 22:01:13 +0000 |
| Subject: | #42391 [Opn]: DOM ignores several valid dtd entities. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-116502@lists.php.net to get a copy of this message | ||
ID: 42391
User updated by: linus dot martensson at elplan-gm dot se
-Summary: DOM handles doctype incorrectly.
Reported By: linus dot martensson at elplan-gm dot se
Status: Open
Bug Type: DOM XML related
Operating System: Linux - Ubuntu Feisty Fawn
PHP Version: 5.2.3
New Comment:
Retouched the summary.
Previous Comments:
------------------------------------------------------------------------
[2007-08-22 21:45:43] linus dot martensson at elplan-gm dot se
Description:
------------
The DOM parser fails to parse SEVERAL valid xhtml entities, such as
» and ⇒, even though both are specified in
http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent
and
http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent.
These two files (among others) are referred to by the specified doctype
definition, xhtml1-strict.dtd.
The parser is obviously not taking all valid xhtml entities into
account, which is a serious problem.
Reproduce code:
---------------
<?php
$d = new DOMDocument();
if(!$d->loadXML('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head></head><body>⇒⇒</body></html>'))
var_dump(libxml_get_last_error());
Expected result:
----------------
No output, should correctly parse the document and store the two
entities in the DOMDocument.
Actual result:
--------------
When the libXml error is retrieved, this is the apparent error:
Line 1: Entity 'rArr' not defined. The parse is aborted.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42391&edit=1