Continued a bit:
[mailer.git] / inc / xml-functions.php
index dc5bb5ba72006d19d86ac66e3c14f6a5ac545434..ee135cfcc51c9baec19856651dfa9641dbe71e5e 100644 (file)
@@ -128,14 +128,8 @@ function addXmlSpecialElements ($template) {
 
 // Parses the XML content
 function parseXmlData ($content) {
-       // Is there recode?
-       if (!isPhpExtensionLoaded('recode')) {
-               // No fallback ATM
-               reportBug(__FUNCTION__, __LINE__, 'PHP extension recode is missing. Please install it.');
-       } // END - if
-
        // Convert HTML entities to UTF-8
-       $content = recode('html..utf8', $content);
+       $decoded = decodeEntities($content);
 
        // Create a new XML parser
        $xmlParser = xml_parser_create();
@@ -151,7 +145,7 @@ function parseXmlData ($content) {
        xml_set_character_data_handler($xmlParser, 'xmlCharacterHandler');
 
        // Now parse the XML tree
-       if (!xml_parse($xmlParser, $content)) {
+       if (!xml_parse($xmlParser, $decoded)) {
                // Error found in XML!
                //* DEBUG: */ die('<pre>'.htmlentities($content).'</pre>');
                reportBug(__FUNCTION__, __LINE__, 'Error found in XML. errorMessage=' . xml_error_string(xml_get_error_code($xmlParser)) . ', line=' . xml_get_current_line_number($xmlParser));