[Freeswitch-svn] [commit] r5504 - freeswitch/trunk/scripts/contrib/trixter/xml-cdr

Freeswitch SVN trixter at freeswitch.org
Fri Jul 6 21:25:58 EDT 2007


Author: trixter
Date: Fri Jul  6 21:25:58 2007
New Revision: 5504

Modified:
   freeswitch/trunk/scripts/contrib/trixter/xml-cdr/Parse_XML_CDR.php

Log:
patch for sometimes invalid data sent 


Modified: freeswitch/trunk/scripts/contrib/trixter/xml-cdr/Parse_XML_CDR.php
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/xml-cdr/Parse_XML_CDR.php	(original)
+++ freeswitch/trunk/scripts/contrib/trixter/xml-cdr/Parse_XML_CDR.php	Fri Jul  6 21:25:58 2007
@@ -9,6 +9,7 @@
     var $_level = 0;
     
     function Parse_CDR_XML(&$data,$showattribs = false) {
+        $data = preg_replace("/<(.*?)><(.*?)><\/(.*?)>/","<\\1>\\2</\\3>",$data);
         $this->_showAttribs = $showattribs;
         $this->_parser = xml_parser_create();
         
@@ -74,6 +75,8 @@
             if (!isset($start[$name])) $start[$name] = '';
             $add = '';
         }
+
+
         $update = &$start[$name];
 
         if ($isattribs && !$this->_showAttribs) return;



More information about the Freeswitch-svn mailing list