diff --git a/renderer.php b/renderer.php
index 41acad7..57027d7 100644
--- a/renderer.php
+++ b/renderer.php
@@ -45,7 +45,8 @@ class renderer_plugin_s5 extends Doku_Renderer_xhtml {
);
p_set_metadata($ID,array('format' => array('s5' => $headers) ));
$this->base = DOKU_BASE.'lib/plugins/s5/ui/';
- $this->tpl = $this->getConf('template');
+ $this->tpl = isset($_GET['s5theme'])?$_GET['s5theme']:$this->getConf('template');
+ $this->tpl = preg_replace('/[^a-z0-9_-]+/', '', $this->tpl); // clean user provided path
}
/**
diff --git a/syntax.php b/syntax.php
index 504066b..706e540 100644
--- a/syntax.php
+++ b/syntax.php
@@ -43,7 +43,7 @@ class syntax_plugin_s5 extends DokuWiki_Syntax_Plugin {
* Connect pattern to lexer
*/
function connectTo($mode) {
- $this->Lexer->addSpecialPattern('~~SLIDESHOW~~',$mode,'plugin_s5');
+ $this->Lexer->addSpecialPattern('~~SLIDESHOW[^~]*~~',$mode,'plugin_s5');
}
@@ -51,7 +51,8 @@ class syntax_plugin_s5 extends DokuWiki_Syntax_Plugin {
* Handle the match
*/
function handle($match, $state, $pos, &$handler){
- return array();
+ if($match!='~~SLIDESHOW~~') return array(trim(substr($match,11,-2)));
+ return array();
}
/**
@@ -61,7 +62,7 @@ class syntax_plugin_s5 extends DokuWiki_Syntax_Plugin {
global $ID;
if($format != 'xhtml') return false;
- $renderer->doc .= '';
+ $renderer->doc .= '';
$renderer->doc .= '
';
$renderer->doc .= '';
return true;