Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Apply bunch of patches by Blair Robertson.

git-svn-id: http://svn.php.net/repository/pear/packages/XML_Tree/trunk@119997 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit ee82c54071446ddf1b6ac9ad00e550197731085f 1 parent dda3241
@mj mj authored
Showing with 6 additions and 4 deletions.
  1. +2 −2 Tree.php
  2. +4 −2 Tree/Node.php
View
4 Tree.php
@@ -203,7 +203,7 @@ function &getTreeFromFile ()
return $this->root;
}
- function getTreeFromString($str)
+ function &getTreeFromString($str)
{
$this->folding = false;
$this->XML_Parser(null, 'event');
@@ -286,7 +286,7 @@ function endHandler($xp, $elem)
*/
function cdataHandler($xp, $data)
{
- if (trim($data)) {
+ if (trim($data) != '') {
$this->cdata .= $data;
}
}
View
6 Tree/Node.php
@@ -319,11 +319,13 @@ function set_content(&$content)
function _xml_entities($xml) {
$xml = str_replace(array('ü', 'Ü', 'ö',
'Ö', 'ä', 'Ä',
- 'ß'
+ 'ß', '<', '>',
+ '"', '\''
),
array('&#252;', '&#220;', '&#246;',
'&#214;', '&#228;', '&#196;',
- '&#223;'
+ '&#223;', '&lt;', '&gt;',
+ '&quot;', '&apos;'
),
$xml
);
Please sign in to comment.
Something went wrong with that request. Please try again.