Wednesday 24 August 2011 12:37:32 am
Really?! Nobody has any suggestions on which direction I should take to solve this. I've hit a dead end... Update: I found a solution and for future reference her it is. I haven't tested it extensively or gone live with it yet. But it looks like it will do the trick, other suggestions are still welcome! in powercontent/modules/powercontent/action.php i added this function
function htmlToXML($html) {
$xml = $html;
$xml = str_replace( "\r", "<br/>", $xml );
$parser = new eZSimplifiedXMLInputParser(0, false, false);
$document = $parser->process($xml);
if ( !is_object( $document ) ) {
return null;
}
$domString = eZXMLTextType::domString($document);
return $domString;
} And then replaced
$http->setPostVariable( $newPostVariable, $postValue ); with
$dataTypeString = $dataMap[$possibleAttributeIdentifier]->attribute( 'data_type_string' );
if ( $dataTypeString == "ezxmltext" )
{
eZDebug::writeNotice( 'Found XML block attribute: ' . $possibleAttributeIdentifier );
$postValue = htmlToXML(trim($postValue));
}
$http->setPostVariable( $newPostVariable, $postValue ); PS: I'm still not getting namespaces on the line-tags but will look into that as well.
|