Tuesday 11 February 2003 4:41:25 pm
> > I've created and submitted a patch to recognise linefeeds
> in
> > XML text fields and render these as <br /> in the
> > final output.
> >
> > It is availiable at
> > http://developer.ez.no/bug/bugview/1870/
> > Sorry.. feel stupid, but where should it go? The patch if actually a "patch" file - you need to apply it to a clean copy of RC2. If you have not done this before it would probally be easier to do it by hand.
There are 2 files that require editing in kernel/classes/datatypes/ezxmltext/ Firstly ezsimpifiedxmlinput.php
after line 236 add the line $paragraph =& preg_replace( "#\n#", "<br />", $paragraph ); so this section now looks liike
foreach ( $paragraphArray as $paragraph )
{
if ( trim( $paragraph ) != "" )
{
# BPM add <br / > tags for single newlines 20030211 15:09
$paragraph =& preg_replace( "#\n#", "<br />", $paragraph );
$sectionData .= "<paragraph>" . trim( $paragraph ) . "</paragraph>\n";
} }
at around line 710
add the line case 'br' :
so this section now looks like
case 'tr' :
case 'td' :
case 'paragraph' :
// BPM 20030211 15:21
case 'br' :
{ }break; In file ezxhtmloutput.php at around line 357 add the line case 'br' :
so this section now looks like
// normal content tags
case 'emphasize' :
case 'strong' :
#BPM 20030211 13:36
case 'br' : {
Hope this helps Bruce
My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish
|