Bug #67081 [Opn->Csd]: DOMDocumentType->internalSubset returns entire DOCTYPE tag, not only the subset

From: Date: Wed, 16 Apr 2014 12:18:07 +0000
Subject: Bug #67081 [Opn->Csd]: DOMDocumentType->internalSubset returns entire DOCTYPE tag, not only the subset
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185266@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67081&edit=1 ID: 67081 Updated by: ab@php.net Reported by: petrhudecek2010 at gmail dot com Summary: DOMDocumentType->internalSubset returns entire DOCTYPE tag, not only the subset -Status: Open +Status: Closed Type: Bug Package: DOM XML related Operating System: Windows PHP Version: 5.5.11 Block user comment: N Private report: N New Comment: Automatic comment on behalf of ab Revision: http://git.php.net/?p=php-src.git;a=commit;h=5224614f23eff18419f2c5489bebe60562e0ce2a Log: Fixed bug #67081 DOMDocumentType-&gt;internalSubset returns entire DOCTYPE tag, not only the subset Previous Comments: ------------------------------------------------------------------------ [2014-04-15 18:45:54] petrhudecek2010 at gmail dot com Description: ------------ The DOM specification (http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-412266927) says that "The internal subset as a string, or null if there is none. This is does not contain the delimiting square brackets." However, PHP returns the entire tag, not only what is inside the square brackets. Test script: --------------- <?php $domDocument = new DOMDocument(); $domDocument->load("bug.xml"); echo $domDocument->doctype->internalSubset; -- bug.xml: -- <?xml version="1.0"?> <!DOCTYPE a [ <!ELEMENT a EMPTY> ]> <a></a> Expected result: ---------------- <!ELEMENT a EMPTY> Actual result: -------------- <!DOCTYPE a [ <!ELEMENT a EMPTY> ]> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67081&edit=1

« previous php.bugs (#185266) next »