* Fix WBXML encoding issue (community bug#3020)

This commit is contained in:
Jörg Lehrke 2011-10-04 21:21:38 +00:00
parent 23584253fd
commit b65428b153
2 changed files with 5 additions and 2 deletions

View File

@ -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 = '<![CDATA['. $chars. ']]>';
if (!$state->isWBXML()) {
$chars = '<![CDATA['. $chars. ']]>';
}
break;
}
$output->characters($chars);

View File

@ -860,6 +860,7 @@ class Horde_SyncML_State {
$res['ContentFormat'] = 'htmlenc';
default:
$res['mayFragment'] = 1;
$res['ContentFormat'] = 'strictxml';
break;
}