From 3f5a0900f1f6db581d2cff2e4f1fe62abac19f0c Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 24 Jan 2025 11:18:44 -0700 Subject: [PATCH] Merge: more messing around with encoding, this time ">" was getting stripped the source was plaintext going into an XML document without parsing html styles --- api/src/Storage/Merge.php | 116 ++++++++++++++++++-------------- api/tests/Storage/MergeTest.php | 73 ++++++++++++++++++++ api/tests/Storage/TestMerge.php | 32 +++++++++ 3 files changed, 170 insertions(+), 51 deletions(-) create mode 100644 api/tests/Storage/MergeTest.php create mode 100644 api/tests/Storage/TestMerge.php diff --git a/api/src/Storage/Merge.php b/api/src/Storage/Merge.php index e20909456b..8fcd0d6149 100644 --- a/api/src/Storage/Merge.php +++ b/api/src/Storage/Merge.php @@ -1403,47 +1403,48 @@ abstract class Merge } } } - if (!empty($is_xml)) // zip'ed xml document (eg. OO) - { - // Numeric fields - $names = array(); + // Numeric fields + $names = array(); - // Tags we can replace with the target document's version - $replace_tags = array(); - // only keep tags, if we have xsl extension available - if(class_exists('XSLTProcessor') && class_exists('DOMDocument') && $this->parse_html_styles) + // Tags we can replace with the target document's version + $replace_tags = array(); + // only keep tags, if we have xsl extension available + if(class_exists('XSLTProcessor') && class_exists('DOMDocument') && $this->parse_html_styles) + { + switch($mimetype . $mso_application_progid) { - switch($mimetype . $mso_application_progid) - { - case 'text/html': - $replace_tags = array( - '', '', '', '', '', '', '
    ', '