$parts =
explode(';',
$type);
if (!\
in_array($parts[0
],
$this->contentTypes
)) { return $response;
} // 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('#<esi\:remove>.*?</esi\:remove>#s', '',
$content);
$content =
preg_replace('#<esi\:comment[^>]+>#s', '',
$content);
$boundary = self::
generateBodyEvalBoundary();
$chunks =
preg_split('#<esi\:include\s+(.*?)\s*(?:/|</esi\:include)>#',
$content, -1, \PREG_SPLIT_DELIM_CAPTURE
);
$i = 1;
while (isset($chunks[$i])) { $options =
[];
preg_match_all('/(src|onerror|alt)="([^"]*?)"/',
$chunks[$i],
$matches, \PREG_SET_ORDER
);
foreach ($matches as $set) { $options[$set[1
]] =
$set[2
];
} if (!
isset($options['src'
])) {