diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/common.php | 2 | ||||
-rw-r--r-- | inc/parser/handler.php | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/inc/common.php b/inc/common.php index 2c200cf5a..b98447cb4 100644 --- a/inc/common.php +++ b/inc/common.php @@ -613,7 +613,7 @@ function cleanText($text){ * @author Andreas Gohr <andi@splitbrain.org> */ function formText($text){ - $text = str_replace("\012","\015\012",$text); + $text = preg_replace("/\012/","\015\012",$text); return htmlspecialchars($text); } diff --git a/inc/parser/handler.php b/inc/parser/handler.php index ae9d76912..a5d07a07a 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -585,9 +585,9 @@ class Doku_Handler { case DOKU_LEXER_MATCHED: if ( $match == ' ' ){ $this->_addCall('cdata', array($match), $pos); - } else if ( strpos('\t',$match) !== false ) { + } else if ( preg_match('/\t+/',$match) ) { $this->_addCall('table_align', array($match), $pos); - } else if ( strpos(' ',$match) !== false ) { + } else if ( preg_match('/ {2,}/',$match) ) { $this->_addCall('table_align', array($match), $pos); } else if ( $match == "\n|" ) { $this->_addCall('table_row', array(), $pos); @@ -659,9 +659,9 @@ function Doku_Handler_Parse_Media($match) { } //get linking command - if(stripos('nolink',$param) !== false){ + if(preg_match('/nolink/i',$param)){ $linking = 'nolink'; - }else if(stripos('direct',$param) !== false){ + }else if(preg_match('/direct/i',$param)){ $linking = 'direct'; }else{ $linking = 'details'; |