|
|
|
@ -67,7 +67,7 @@ class Render
|
|
|
|
|
$parser = new Parser();
|
|
|
|
|
$rendered = $parser->parse($page["content"]);
|
|
|
|
|
$sanitizer = \HtmlSanitizer\Sanitizer::create([
|
|
|
|
|
"extensions" => ["basic", "image", "list"],
|
|
|
|
|
"extensions" => ["basic", "image", "list", "code"],
|
|
|
|
|
]);
|
|
|
|
|
$preclean = $sanitizer->sanitize($rendered->getContent());
|
|
|
|
|
$cleaned = strip_tags($preclean, [
|
|
|
|
@ -84,6 +84,8 @@ class Render
|
|
|
|
|
"h1",
|
|
|
|
|
"h2",
|
|
|
|
|
"h3",
|
|
|
|
|
"pre",
|
|
|
|
|
"code",
|
|
|
|
|
]);
|
|
|
|
|
//$cleaned = preg_replace('/(?:\r\n|[\r\n]){2,}/', "\n\n", $cleaned);
|
|
|
|
|
//$cleaned = html_entity_decode($cleaned, ENT_QUOTES, "UTF-8");
|
|
|
|
|