Be more tolerant and also accept <esi:include ...></esi:include> #2952

Merged
merged 1 commit into from Dec 26, 2011

Conversation

Projects
None yet
2 participants
Contributor

mpdude commented Dec 23, 2011

I know this is not 100% standards compliant, but:

We need to do some XHTML processing on the output using PHP's DOM extension and the underlying libxml2.

libxml2 seems to be unable to keep the <esi:include /> tag as such and will expand it to <esi:include ...></esi:include>.

Note this has nothing to do with having LIBXML_NOEMPTYTAG set (http://php.net/manual/de/domdocument.savexml.php). Rather it seems to be a problem for libxml that it cannot recognize esi:include as an "EMPTY" tag (in the DTD sense) because it is not defined in a standard xhtml1-strict DTD.

fabpot added a commit that referenced this pull request Dec 26, 2011

merged branch webfactory/tolerant_esi_include (PR #2952)
Commits
-------

cae7db0 Be more tolerant and also accept <esi:include ...></esi:include>, also if it is not 100% standards compliant.

Discussion
----------

Be more tolerant and also accept <esi:include ...></esi:include>

I know this is not 100% standards compliant, but:

We need to do some XHTML processing on the output using PHP's DOM extension and the underlying libxml2.

libxml2 seems to be unable to keep the <esi:include /> tag as such and will expand it to ```<esi:include ...></esi:include>```.

Note this has nothing to do with having LIBXML_NOEMPTYTAG set (http://php.net/manual/de/domdocument.savexml.php). Rather it seems to be a problem for libxml that it cannot recognize <esi:include> as an "EMPTY" tag (in the DTD sense) because it is not defined in a standard xhtml1-strict DTD.

@fabpot fabpot merged commit cae7db0 into symfony:master Dec 26, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment