#42391 [Opn->Bgs]: DOM ignores several valid dtd entities.
| From: | rrichards@php.net | Date: | Wed, 22 Aug 2007 22:49:12 +0000 |
| Subject: | #42391 [Opn->Bgs]: DOM ignores several valid dtd entities. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-116505@lists.php.net to get a copy of this message | ||
ID: 42391
Updated by: rrichards@php.net
Reported By: linus dot martensson at elplan-gm dot se
-Status: Open
+Status: Bogus
Bug Type: DOM XML related
Operating System: Linux - Ubuntu Feisty Fawn
PHP Version: 5.2.3
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
You need to pass the LIBXML_DTDLOAD option to loadXML as external
subsets are not loaded by default
Previous Comments:
------------------------------------------------------------------------
[2007-08-22 22:01:13] linus dot martensson at elplan-gm dot se
Retouched the summary.
------------------------------------------------------------------------
[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