Permalink
Browse files

readded some lost patches

(thanks to Blair Robertson <brobertson@squiz.net>)


git-svn-id: http://svn.php.net/repository/pear/packages/XML_Tree/trunk@134617 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 1573d96 commit be90041a21aa6f451cb098089032058963a85d3e @tvvcox tvvcox committed Jul 11, 2003
Showing with 8 additions and 6 deletions.
  1. +3 −3 Tree.php
  2. +5 −3 Tree/Node.php
View
@@ -3,7 +3,7 @@
// +----------------------------------------------------------------------+
// | PEAR :: XML_Tree |
// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PHP Group |
+// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.02 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
@@ -253,7 +253,7 @@ function &getTreeFromFile ()
* @return mixed The XML tree root (an XML_Tree_Node), or PEAR_Error upon error.
* @access public
*/
- function getTreeFromString($str)
+ function &getTreeFromString($str)
{
$this->folding = false;
$this->XML_Parser(null, 'event');
@@ -339,7 +339,7 @@ function endHandler($xp, $elem)
*/
function cdataHandler($xp, $data)
{
- if (trim($data)) {
+ if (trim($data) != '') {
$this->cdata .= $data;
}
}
View
@@ -2,7 +2,7 @@
// +----------------------------------------------------------------------+
// | PEAR :: XML_Tree |
// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PHP Group |
+// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.02 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
@@ -462,11 +462,13 @@ function encodeXmlEntities($xml)
{
$xml = str_replace(array('ü', 'Ü', 'ö',
'Ö', 'ä', 'Ä',
- 'ß'
+ 'ß', '<', '>',
+ '"', '\''
),
array('&#252;', '&#220;', '&#246;',
'&#214;', '&#228;', '&#196;',
- '&#223;'
+ '&#223;', '&lt;', '&gt;',
+ '&quot;', '&apos;'
),
$xml
);

0 comments on commit be90041

Please sign in to comment.