Fix invalid XML CDR

This commit is contained in:
FusionPBX 2025-02-15 19:07:35 -07:00 committed by GitHub
parent d490d6d5ab
commit 60d60a2b1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -310,6 +310,9 @@ if (!class_exists('xml_cdr')) {
//remove invalid numeric xml tags
$xml_string = preg_replace('/<\/?\d+>/', '', $xml_string);
//replace xml tag name <set api_hangup_hook> with <api_hangup_hook>
$xml_string = preg_replace('/(<\/?)(set )([^>]*>)/', '$1$3', $xml_string);
//disable xml entities
if (PHP_VERSION_ID < 80000) { libxml_disable_entity_loader(true); }