Permalink
Browse files

fixes #13

  • Loading branch information...
1 parent 0faa895 commit 4e54b0b7019ec7d38198f3f9e9780e1ec9efdba4 @abhinavsingh abhinavsingh committed Aug 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/jaxl_xml.php
View
@@ -206,12 +206,12 @@ public function to_string($parent_ns=null) {
$xml .= '<'.$this->name;
if($this->ns && $this->ns != $parent_ns) $xml .= ' xmlns="'.$this->ns.'"';
- foreach($this->attrs as $k=>$v) if(!is_null($v) && $v !== FALSE) $xml .= ' '.$k.'="'.$v.'"';
+ foreach($this->attrs as $k=>$v) if(!is_null($v) && $v !== FALSE) $xml .= ' '.$k.'="'.htmlspecialchars($v).'"';
$xml .= '>';
foreach($this->childrens as $child) $xml .= $child->to_string($this->ns);
- if($this->text) $xml .= $this->text;
+ if($this->text) $xml .= htmlspecialchars($this->text);
$xml .= '</'.$this->name.'>';
return $xml;
}

0 comments on commit 4e54b0b

Please sign in to comment.