Skip to content

Commit

Permalink
Merge pull request #2 from northernco/increase-max-length
Browse files Browse the repository at this point in the history
Increase the sanitizer's max length to 1M to be more reasonable
  • Loading branch information
natewiebe13 committed Jul 22, 2020
2 parents 404fc1e + a698720 commit 23b4dc1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Service/MarkdownParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']],
Expand Down

0 comments on commit 23b4dc1

Please sign in to comment.