diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 740ccea04fe07827e5a75bf3c5422f63ba98a51e..ad2bb6056a0d3658e6f97142549ceb05aa7cbf86 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -268,11 +268,7 @@ class Doku_Handler { function php($match, $state, $pos) { global $conf; if ( $state == DOKU_LEXER_UNMATCHED ) { - if ($conf['phpok']) { - $this->_addCall('php',array($match), $pos); - } else { - $this->_addCall('file',array($match), $pos); - } + $this->_addCall('php',array($match), $pos); } return true; } @@ -280,11 +276,7 @@ class Doku_Handler { function phpblock($match, $state, $pos) { global $conf; if ( $state == DOKU_LEXER_UNMATCHED ) { - if ($conf['phpok']) { - $this->_addCall('phpblock',array($match), $pos); - } else { - $this->_addCall('file',array($match), $pos); - } + $this->_addCall('phpblock',array($match), $pos); } return true; } @@ -292,11 +284,7 @@ class Doku_Handler { function html($match, $state, $pos) { global $conf; if ( $state == DOKU_LEXER_UNMATCHED ) { - if($conf['htmlok']){ - $this->_addCall('html',array($match), $pos); - } else { - $this->_addCall('file',array($match), $pos); - } + $this->_addCall('html',array($match), $pos); } return true; } @@ -304,11 +292,7 @@ class Doku_Handler { function htmlblock($match, $state, $pos) { global $conf; if ( $state == DOKU_LEXER_UNMATCHED ) { - if($conf['htmlok']){ - $this->_addCall('htmlblock',array($match), $pos); - } else { - $this->_addCall('file',array($match), $pos); - } + $this->_addCall('htmlblock',array($match), $pos); } return true; } diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index f033f6082a728e89cc8225983a4b1aff1920fc44..5e322d839acae5fcdec9d4f1d57ed7350d045e57 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -305,10 +305,14 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * @author Andreas Gohr <andi@splitbrain.org> */ function php($text) { - ob_start(); - eval($text); - $this->doc .= ob_get_contents(); - ob_end_clean(); + if($conf['phpok']){ + ob_start(); + eval($text); + $this->doc .= ob_get_contents(); + ob_end_clean(); + } else { + $this->code($text, 'php'); + } } function phpblock($text) { @@ -321,7 +325,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * @author Andreas Gohr <andi@splitbrain.org> */ function html($text) { - $this->doc .= $text; + if($conf['htmlok']){ + $this->doc .= $text; + } else { + $this->code($text, 'html4strict'); + } } function htmlblock($text) {