summaryrefslogtreecommitdiff
path: root/lib/helper.php
diff options
context:
space:
mode:
authorFrédéric Guillot <contact@fredericguillot.com>2014-02-21 19:06:53 -0500
committerFrédéric Guillot <contact@fredericguillot.com>2014-02-21 19:06:53 -0500
commitc80ec9f10c23066c160fcff9a4da90cd483d54b9 (patch)
tree52b77dfd5b2a1acbfb05b24e4d11a2e19838ac36 /lib/helper.php
parent252b589c3498c0caf8a4da3dac79b3e0af98828f (diff)
Replace Mardown parser by another one to be able to disallow markup or entities
Diffstat (limited to 'lib/helper.php')
-rw-r--r--lib/helper.php9
1 files changed, 7 insertions, 2 deletions
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()