diff options
-rw-r--r-- | inc/common.php | 2 | ||||
-rw-r--r-- | inc/parser/handler.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/inc/common.php b/inc/common.php index b98447cb4..2c200cf5a 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 = preg_replace("/\012/","\015\012",$text); + $text = str_replace("\012","\015\012",$text); return htmlspecialchars($text); } diff --git a/inc/parser/handler.php b/inc/parser/handler.php index a5d07a07a..20c01b1eb 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 ( preg_match('/\t+/',$match) ) { + } else if ( strpos('\t',$match) !== false ) { $this->_addCall('table_align', array($match), $pos); - } else if ( preg_match('/ {2,}/',$match) ) { + } else if ( strpos(' ',$match) !== false ) { $this->_addCall('table_align', array($match), $pos); } else if ( $match == "\n|" ) { $this->_addCall('table_row', array(), $pos); |