Mark Twig markdown filter as HTML safe

This commit is contained in:
Daniel Rudolf 2019-10-24 12:02:23 +02:00
parent d2573c5df5
commit cb3bdd149f
No known key found for this signature in database
GPG key ID: A061F02CD8DE4538

View file

@ -72,7 +72,11 @@ class PicoTwigExtension extends Twig_Extension
public function getFilters()
{
return array(
'markdown' => new Twig_SimpleFilter('markdown', array($this, 'markdownFilter')),
'markdown' => new Twig_SimpleFilter(
'markdown',
array($this, 'markdownFilter'),
array('is_safe' => array('html'))
),
'map' => new Twig_SimpleFilter('map', array($this, 'mapFilter')),
'sort_by' => new Twig_SimpleFilter('sort_by', array($this, 'sortByFilter')),
'link' => new Twig_SimpleFilter('link', array($this->pico, 'getPageUrl')),