diff --git a/inc/io.php b/inc/io.php index e1c4d1eb978828ce9244b4b240171f239590886d..ff318bd67f24e3bd29455a4ca05357ccb82fa149 100644 --- a/inc/io.php +++ b/inc/io.php @@ -36,7 +36,7 @@ function io_sweepNS($id){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function io_readFile($file){ +function io_readFile($file,$clean=true){ $ret = ''; if(@file_exists($file)){ if(substr($file,-3) == '.gz'){ @@ -45,7 +45,11 @@ function io_readFile($file){ $ret = join('',file($file)); } } - return cleanText($ret); + if($clean){ + return cleanText($ret); + }else{ + return $ret; + } } /** diff --git a/inc/parserutils.php b/inc/parserutils.php index 16ee5c6f5b1494a28a04eed04cd7b38e0da394bf..0a476b99825eea2192dfd4d3650b39b6e15fe18b 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -179,7 +179,7 @@ function p_cached_instructions($file,$cacheonly=false){ // cache forced? if($cacheonly){ if($cachetime){ - return unserialize(io_readfile($cache)); + return unserialize(io_readfile($cache,false)); }else{ return array(); } @@ -194,7 +194,7 @@ function p_cached_instructions($file,$cacheonly=false){ && ($cachetime > @filemtime(DOKU_INC.'inc/parser/handler.php')))// newer than the handler { //well then use the cache - return unserialize(io_readfile($cache)); + return unserialize(io_readfile($cache,false)); }elseif(@file_exists($file)){ // no cache - do some work $ins = p_get_instructions(io_readfile($file));