mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit 8f0089b080c8485e627b4adc8a83f80c3978b78e
parent fdaaeae0de36f8a19fc46f53b78c4a4b1aaa6202
Author: markseu <mark2011@mayberg.se>
Date:   Tue, 26 Aug 2014 13:37:18 +0200

Markdown update (Wunderfeyd HTML filter)

Diffstat:
Msystem/core/core-markdownextra.php | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/system/core/core-markdownextra.php b/system/core/core-markdownextra.php @@ -5,7 +5,7 @@ // Markdown extra core plugin class YellowMarkdownExtra { - const Version = "0.3.9"; + const Version = "0.3.10"; var $yellow; //access to API // Handle plugin initialisation @@ -18,7 +18,7 @@ class YellowMarkdownExtra function onParseContentText($page, $text) { $markdown = new YellowMarkdownExtraParser($this->yellow, $page); - return $markdown->transformText($text); + return $markdown->transform($text); } } @@ -44,13 +44,13 @@ class YellowMarkdownExtraParser extends MarkdownExtraParser parent::__construct(); } - // Transform page text - function transformText($text) + // Transform text + function transform($text) { $text = preg_replace("/@pageRead/i", $this->page->get("pageRead"), $text); $text = preg_replace("/@pageEdit/i", $this->page->get("pageEdit"), $text); $text = preg_replace("/@pageError/i", $this->page->get("pageError"), $text); - return $this->transform($text); + return parent::transform($text); } // Return unique id attribute @@ -83,7 +83,7 @@ class YellowMarkdownExtraParser extends MarkdownExtraParser { $text = preg_replace("/\s+/s", " ", $matches[2]); $output = $this->page->parseType($matches[1], $text, true); - if(is_null($output)) $output = $matches[0]; + if(is_null($output)) $output = htmlspecialchars($matches[0], ENT_NOQUOTES); return $this->hashBlock($output); }