X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fxml-functions.php;h=ee135cfcc51c9baec19856651dfa9641dbe71e5e;hb=refs%2Fheads%2Fserver-0.2.1-FINAL%2Fshipsimu-org;hp=0228d8f528cd5afe3af34844c55ae4a368080f39;hpb=e5dffd4249c97200cbad02f3f4eaf5c373fdb89a;p=mailer.git diff --git a/inc/xml-functions.php b/inc/xml-functions.php index 0228d8f528..ee135cfcc5 100644 --- a/inc/xml-functions.php +++ b/inc/xml-functions.php @@ -10,13 +10,8 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Funktionen zum Umgang mit XML-Templates * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2013 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 * @@ -133,14 +128,8 @@ function addXmlSpecialElements ($template) { // Parses the XML content function parseXmlData ($content) { - // Is there recode? - if (!function_exists('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(); @@ -156,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('
'.htmlentities($content).'
'); reportBug(__FUNCTION__, __LINE__, 'Error found in XML. errorMessage=' . xml_error_string(xml_get_error_code($xmlParser)) . ', line=' . xml_get_current_line_number($xmlParser));