Be more tolerant and also accept <esi:include ...></esi:include>, also if it is not 100% standards compliant.
This commit is contained in:
parent
d635be4e20
commit
cae7db0d19
@ -154,8 +154,8 @@ class Esi
|
||||
|
||||
// we don't use a proper XML parser here as we can have ESI tags in a plain text response
|
||||
$content = $response->getContent();
|
||||
$content = preg_replace_callback('#<esi\:include\s+(.*?)\s*/>#', array($this, 'handleEsiIncludeTag'), $content);
|
||||
$content = preg_replace('#<esi\:comment[^>]*/>#', '', $content);
|
||||
$content = preg_replace_callback('#<esi\:include\s+(.*?)\s*(?:/|</esi\:include)>#', array($this, 'handleEsiIncludeTag'), $content);
|
||||
$content = preg_replace('#<esi\:comment[^>]*(?:/|</esi\:comment)>#', '', $content);
|
||||
$content = preg_replace('#<esi\:remove>.*?</esi\:remove>#', '', $content);
|
||||
|
||||
$response->setContent($content);
|
||||
|
Reference in New Issue
Block a user