Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv9310/em_includes
Modified Files:
parser_xml.php
Log Message:
- fixed a few bugs in the modx parsing routines
Index: parser_xml.php
===================================================================
RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/parser_xml.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** parser_xml.php 1 Oct 2006 22:09:24 -0000 1.1
--- parser_xml.php 8 Feb 2008 19:26:43 -0000 1.2
***************
*** 61,65 ****
function mod_parser_xml($mod_contents)
{
! $this->mod_contents = preg_replace("/\r?\n|\r/", "\n", stripslashes(trim($mod_contents)));
}
--- 61,65 ----
function mod_parser_xml($mod_contents)
{
! $this->mod_contents = str_replace(array("\r\n", "\r", "\n"), "\n", trim($mod_contents));
}
***************
*** 113,121 ****
if(isset($this->data[count($this->data)-1]['data']))
{
! $this->data[count($this->data)-1]['data'] .= unhtmlspecialchars($tag_data);
}
else
{
! $this->data[count($this->data)-1]['data'] = unhtmlspecialchars($tag_data);
}
}
--- 113,121 ----
if(isset($this->data[count($this->data)-1]['data']))
{
! $this->data[count($this->data)-1]['data'] .= $tag_data;
}
else
{
! $this->data[count($this->data)-1]['data'] = $tag_data;
}
}
***************
*** 239,242 ****
--- 239,245 ----
$action_info = ( !empty($edit_info[$j]['children']) ) ? $edit_info[$j]['children'] : array();
$this->actions['open'][$current_file]['edit'][$j]['find'] = $action_info['FIND'][0]['data'];
+ //echo '<pre>';
+ //print_r($this->actions['open'][$current_file]['edit'][$j]['find']);
+ //exit('</pre>');
$actions = ( !empty($action_info['ACTION']) ) ? $action_info['ACTION'] : array();
***************
*** 290,300 ****
}
- function unhtmlspecialchars($string)
- {
- $unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#');
- $unhtml_specialchars_replace = array('>', '<', '"', '&');
-
- return preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, $string);
- }
-
?>
\ No newline at end of file
--- 293,295 ----
|