Skip to content

Commit

Permalink
fix parsedown dynamic properties
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed May 8, 2023
1 parent e1019c4 commit 598836d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
1. [](#improved)
* Removed `FILTER_SANITIZE_STRING` input filter in favor of `htmlspecialchars(strip_tags())`
* Added `GRAV_SANITIZE_STRING` constant to replace `FILTER_SANITIZE_STRING`
* Support non-deprecated style dynamic properties in `Parsedown` class via `ParseDownGravTrait`

# v1.7.40
## 03/22/2023
Expand Down
13 changes: 13 additions & 0 deletions system/src/Grav/Common/Markdown/ParsedownGravTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ trait ParsedownGravTrait
/** @var array */
public $continuable_blocks = [];

/** @var array */
protected $values = [];

/** @var Excerpts */
protected $excerpts;
/** @var array */
Expand Down Expand Up @@ -300,4 +303,14 @@ public function __call($method, $args)

return null;
}

public function __get($key)
{
return $this->values[$key];
}

public function __set($key, $value)
{
$this->values[$key] = $value;
}
}

0 comments on commit 598836d

Please sign in to comment.