]> git.mxchange.org Git - mailer.git/blobdiff - inc/xml-functions.php
Continued a bit:
[mailer.git] / inc / xml-functions.php
index 6a1e42a3d7701f10929035406d6f1b27d1c95e60..ee135cfcc51c9baec19856651dfa9641dbe71e5e 100644 (file)
@@ -11,7 +11,7 @@
  * Kurzbeschreibung  : Funktionen zum Umgang mit XML-Templates          *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -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));