getConf('use_sure')) < 1) return false; // are you *really* sure? if (intval($this->getConf('use_really_sure')) < 1) return false; return true; } function html_sanitize ($html, $mode, $wrapper='code') { $select_sanitizer= ''; if ($this->getConf('sanitizer') === '') { // nothing to do } else if (preg_match('/^[a-zA-Z\-_0-9]+$/', $this->getConf('sanitizer'))) { $select_sanitizer= $this->getConf('sanitizer'); $html= $select_sanitizer($html); } else { msg('HTML: Invalid sanitizer function: ignored', -1); } return $html; } function handle ($match, $state, $pos, Doku_Handler $handler) { switch ($state) { case DOKU_LEXER_ENTER : { return array($state, $match); } case DOKU_LEXER_UNMATCHED : { $match= $this->html_sanitize($match, 'code'); return array($state, $match); } case DOKU_LEXER_EXIT : { return array($state, $match); } case DOKU_LEXER_SPECIAL : return array($state, $match); } return array(); } function render ($mode, Doku_Renderer $renderer, $data) { } }; ?>