Better note escape

This commit is contained in:
James Cole 2020-10-24 16:49:21 +02:00
parent 08f347cd57
commit 179a710c5b
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D

View File

@ -290,7 +290,8 @@ class General extends AbstractExtension
$environment = Environment::createCommonMarkEnvironment();
$environment->addExtension(new GithubFlavoredMarkdownExtension());
$converter = new CommonMarkConverter([], $environment);
$converter = new CommonMarkConverter(['allow_unsafe_links' => false, 'max_nesting_level' => 3, 'html_input' => 'escape'], $environment);
return $converter->convertToHtml($text);
}, ['is_safe' => ['html']]
);