[Phpxd-commits] CVS: phpXD phpXD.php,1.21,1.22
Status: Beta
Brought to you by:
growbal
|
From: Thomas D. <th...@us...> - 2001-11-29 20:37:33
|
Update of /cvsroot/phpxd/phpXD
In directory usw-pr-cvs1:/tmp/cvs-serv11347
Modified Files:
phpXD.php
Log Message:
Bug in handleCharacterData fixed. Textnodes with only spaces were ignored.
Index: phpXD.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/phpXD.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** phpXD.php 2001/11/27 21:29:36 1.21
--- phpXD.php 2001/11/29 20:37:29 1.22
***************
*** 400,408 ****
$text = str_replace("\r", " ", $text);
$text = str_replace(" ", " ", $text);
!
! if (trim($text) != "") {
! $this->lastNode =& $this->currentNode->appendChild(
! $this->document->createTextNode($text));
! }
}
}
--- 400,407 ----
$text = str_replace("\r", " ", $text);
$text = str_replace(" ", " ", $text);
! $text = preg_replace("/\ +/", " ", $text);
!
! $this->lastNode =& $this->currentNode->appendChild(
! $this->document->createTextNode($text));
}
}
|