From 2c8ab313a711c0e91a82b98132d43a3c58ae4c40 Mon Sep 17 00:00:00 2001 From: thomegabi Date: Tue, 18 Nov 2025 08:34:59 -0300 Subject: [PATCH] add scape para '&' quando sozinho durante o parse --- lib/OfxParser/Parser.php | 10 ++++++++++ 1 file changed, 10 insertions(+) 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));