|
@@ -68,7 +68,7 @@ class XmlDeserializationVisitor extends AbstractDeserializationVisitor
|
|
|
$dom->loadXML($data);
|
|
|
foreach ($dom->childNodes as $child) {
|
|
|
if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) {
|
|
|
- $internalSubset = str_replace(PHP_EOL, '', $child->internalSubset);
|
|
|
+ $internalSubset = str_replace(array("\n", "\r"), '', $child->internalSubset);
|
|
|
if (!in_array($internalSubset, $this->doctypeWhitelist, true)) {
|
|
|
throw new \InvalidArgumentException(sprintf(
|
|
|
'The document type "%s" is not allowed. If it is safe, you may add it to the whitelist configuration.',
|