From c80ec9f10c23066c160fcff9a4da90cd483d54b9 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Fri, 21 Feb 2014 19:06:53 -0500 Subject: Replace Mardown parser by another one to be able to disallow markup or entities --- lib/helper.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/helper.php') diff --git a/lib/helper.php b/lib/helper.php index a0279681..922faba0 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -4,8 +4,13 @@ namespace Helper; function markdown($text) { - require_once __DIR__.'/../vendor/Parsedown/Parsedown.php'; - return \Parsedown::instance()->parse($text); + require_once __DIR__.'/../vendor/Michelf/MarkdownExtra.inc.php'; + + $parser = new \Michelf\MarkdownExtra; + $parser->no_markup = true; + $parser->no_entities = true; + + return $parser->transform($text); } function get_current_base_url() -- cgit v1.2.3