Index: kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php =================================================================== --- kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php (revision 24390) +++ kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php (working copy) @@ -727,6 +727,8 @@ $text = str_replace( '"', '"', $text ); $text = str_replace( '&', '&', $text ); $text = str_replace( ' ', ' ', $text ); + $text = preg_replace ( '/( ){2,}/' , ' ', $text); + $text = preg_replace ( '/^([ |[:blank:]])+$/' , '', $text); return $text; } Index: kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php =================================================================== --- kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php (revision 24390) +++ kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php (working copy) @@ -556,6 +556,7 @@ if ( $element->parentNode->nodeName != 'literal' ) { $text = htmlspecialchars( $element->textContent ); + $text = preg_replace ( '/ /' , ' ', $text); // Get rid of linebreak and spaces stored in xml file $text = preg_replace( "#[\n]+#", "", $text ); Index: extension/ezoe/ezxmltext/handlers/input/ezoexmlinput.php =================================================================== --- extension/ezoe/ezxmltext/handlers/input/ezoexmlinput.php (revision 163) +++ extension/ezoe/ezxmltext/handlers/input/ezoexmlinput.php (working copy) @@ -745,6 +745,7 @@ eZDebugSetting::writeDebug( 'kernel-datatype-ezxmltext', $output, 'eZOEXMLInput::inputXML xml output to return' ); $output = htmlspecialchars( $output, ENT_COMPAT, 'UTF-8' ); + $output = preg_replace ( '/ /' , ' ', $output); return $output; }