53 ?> |
53 ?> |
54 </div> |
54 </div> |
55 <?php |
55 <?php |
56 } |
56 } |
57 |
57 |
58 function wikiFormat($message, $filter_links = true) |
58 function wikiFormat($text) |
59 { |
59 { |
60 $wiki = Text_Wiki::singleton('Mediawiki'); |
60 require_once( ENANO_ROOT . '/includes/render.php' ); |
61 $wiki->setRenderConf('Xhtml', 'code', 'css_filename', 'codefilename'); |
61 require_once( ENANO_ROOT . '/includes/wikiformat.php' ); |
62 $wiki->setRenderConf('Xhtml', 'wikilink', 'view_url', scriptPath . '/index.php?title='); |
62 require_once( ENANO_ROOT . '/includes/wikiengine/TagSanitizer.php' ); |
63 $result = $wiki->transform($message, 'Xhtml'); |
63 require_once( ENANO_ROOT . '/includes/wikiengine/Tables.php' ); |
64 |
64 |
65 // HTML fixes |
65 $carpenter = new Carpenter(); |
66 $result = preg_replace('#<tr>([\s]*?)<\/tr>#is', '', $result); |
66 // disable rules that require the DB |
67 $result = preg_replace('#<p>([\s]*?)<\/p>#is', '', $result); |
67 $carpenter->disable_rule('templates'); |
68 $result = preg_replace('#<br />([\s]*?)<table#is', '<table', $result); |
68 $carpenter->disable_rule('internallink'); |
|
69 $carpenter->disable_rule('image'); |
69 |
70 |
70 return $result; |
71 $text = $carpenter->render($text); |
|
72 |
|
73 return $text; |
71 } |
74 } |
72 |
75 |
73 ?> |
76 ?> |
74 <h3><?php echo $lang->get('license_heading'); ?></h3> |
77 <h3><?php echo $lang->get('license_heading'); ?></h3> |
75 <p><?php echo $lang->get('license_blurb_thankyou'); ?></p> |
78 <p><?php echo $lang->get('license_blurb_thankyou'); ?></p> |