summaryrefslogtreecommitdiff
path: root/inc/parser
diff options
context:
space:
mode:
Diffstat (limited to 'inc/parser')
-rw-r--r--inc/parser/xhtml.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index c8ea9323c..1e520852e 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -313,9 +313,12 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
if ( is_null($language) ) {
$this->preformatted($text);
} else {
- // Handle with Geshi here FIXME: strip first beginning newline
+ //strip leading blank line
+ $text = preg_replace('/^\s*?\n/','',$text);
+ // Handle with Geshi here
require_once(DOKU_INC . 'inc/geshi.php');
$geshi = new GeSHi($text, strtolower($language), DOKU_INC . 'inc/geshi');
+ $geshi->set_encoding('utf-8');
$geshi->enable_classes();
$geshi->set_header_type(GESHI_HEADER_PRE);
$geshi->set_overall_class('code');