diff --git a/etemplate/inc/class.bo_merge.inc.php b/etemplate/inc/class.bo_merge.inc.php index f94cedd9b4..7073c00d6a 100644 --- a/etemplate/inc/class.bo_merge.inc.php +++ b/etemplate/inc/class.bo_merge.inc.php @@ -348,7 +348,6 @@ abstract class bo_merge { $mso_application_progid = ''; } - // Tags we can replace with the target document's version $replace_tags = array(); switch($mimetype.$mso_application_progid) @@ -402,6 +401,15 @@ abstract class bo_merge { $element = new SimpleXMLelement($content); $content = $xslt->transformToXml($element); + + // Word 2003 needs invalid XML, add back in + if($mimetype == 'application/xml' && $mso_application_progid == 'Word.Document') { + $content = ''.$content; + } + // Validate + $doc = new DOMDocument(); +// $doc->loadXML($content); +// $doc->schemaValidate('/home/nathan/Downloads/WordprocessingML Schemas/wordnet.xsd'); //echo $content;die(); } catch (Exception $e)