From 6bbae53816f31e7ad2c6536866674c218c63f6a4 Mon Sep 17 00:00:00 2001 From: andi Date: Sun, 17 Apr 2005 17:40:42 +0200 Subject: fixed preview darcs-hash:20050417154042-9977f-a599079671a126c53c508de5ac1ea5da734c933d.gz --- inc/html.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 8cac264b1..0e1364316 100644 --- a/inc/html.php +++ b/inc/html.php @@ -8,6 +8,8 @@ if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/'); + require_once(DOKU_INC.'inc/parserutils.php'); + /** * Convenience function to quickly build a wikilink * @@ -84,9 +86,12 @@ function html_login(){ ?> */ -function html_show($text=''){ +function html_show($txt=''){ global $ID; global $REV; global $HIGH; //disable section editing for old revisions or in preview if($text || $REV){ - global $parser; - $parser['secedit'] = false; + $secedit = false; + }else{ + $secedit = true; } - - if ($text){ + + if ($txt){ //PreviewHeader print p_locale_xhtml('preview'); print '
'; - print html_secedit(parse($text),false); + print html_secedit(p_render_xhtml(p_get_instructions($txt)),$secedit); print '
'; + }else{ if ($REV) print p_locale_xhtml('showrev'); $html = p_wiki_xhtml($ID,$REV,true); - $html = html_secedit($html); + $html = html_secedit($html,$secedit); print html_hilight($html,$HIGH); } } -- cgit v1.2.3