diff --git a/lib/OfxParser/Parser.php b/lib/OfxParser/Parser.php index ad10b94..4c6c042 100644 --- a/lib/OfxParser/Parser.php +++ b/lib/OfxParser/Parser.php @@ -83,6 +83,16 @@ private function xmlLoadString($xmlString) libxml_clear_errors(); libxml_use_internal_errors(true); $xml = simplexml_load_string($xmlString); + $xmlString = preg_replace_callback( + '/>([^<]&[^<])<'; + }, + $xmlString + ); + $xml = simplexml_load_string($xmlString); if ($errors = libxml_get_errors()) { throw new \RuntimeException('Failed to parse OFX: ' . var_export($errors, true));