From e5679396d953cc9d7207f71ff1cc665d604d49ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lehrke?= Date: Wed, 5 Oct 2011 17:39:50 +0000 Subject: [PATCH] * Fix WBXML encoding issue (community bug#3020) --- .../horde/Horde/SyncML/Command/Sync/ContentSyncElement.php | 6 ++++-- phpgwapi/inc/horde/Horde/SyncML/State.php | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/horde/Horde/SyncML/Command/Sync/ContentSyncElement.php b/phpgwapi/inc/horde/Horde/SyncML/Command/Sync/ContentSyncElement.php index 28a48f7ac4..f760a96616 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/Command/Sync/ContentSyncElement.php +++ b/phpgwapi/inc/horde/Horde/SyncML/Command/Sync/ContentSyncElement.php @@ -48,7 +48,7 @@ class Horde_SyncML_Command_Sync_ContentSyncElement extends Horde_SyncML_Command_ case 'strictxml': break; case 'htmlenc': - if ($this->_contentSize) { + if (!$state->isWBXML() && $this->_contentSize) { $this->_content = htmlspecialchars($this->_content, ENT_COMPAT, 'UTF-8'); } break; @@ -138,7 +138,9 @@ class Horde_SyncML_Command_Sync_ContentSyncElement extends Horde_SyncML_Command_ } switch ($contentFormat) { case 'strictxml': - $chars = ''; + if (!$state->isWBXML()) { + $chars = ''; + } break; } $output->characters($chars); diff --git a/phpgwapi/inc/horde/Horde/SyncML/State.php b/phpgwapi/inc/horde/Horde/SyncML/State.php index b3f876964b..14a1cbe8a2 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/State.php +++ b/phpgwapi/inc/horde/Horde/SyncML/State.php @@ -860,6 +860,7 @@ class Horde_SyncML_State { $res['ContentFormat'] = 'htmlenc'; default: $res['mayFragment'] = 1; + $res['ContentFormat'] = 'strictxml'; break; }