From a6987209bcd043b8c8094457377befab3cc085d6 Mon Sep 17 00:00:00 2001 From: Nate Wiebe Date: Wed, 22 Jul 2020 09:40:46 -0400 Subject: [PATCH] Increase the sanitizer's max length to 1M to be more reasonable --- Service/MarkdownParser.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Service/MarkdownParser.php b/Service/MarkdownParser.php index a52fe95..f4fca47 100644 --- a/Service/MarkdownParser.php +++ b/Service/MarkdownParser.php @@ -13,8 +13,9 @@ public function __construct() $this->parsedown = new \Parsedown(); $this->sanitizer = \HtmlSanitizer\Sanitizer::create( [ - 'extensions' => ['basic', 'list', 'table', 'image', 'code', 'extra'], - 'tags' => [ + 'max_input_length' => 1000000, + 'extensions' => ['basic', 'list', 'table', 'image', 'code', 'extra'], + 'tags' => [ 'code' => ['allowed_attributes' => ['class']], 'th' => ['allowed_attributes' => ['style']], 'td' => ['allowed_attributes' => ['style']],