diff --git a/CHANGELOG.md b/CHANGELOG.md index 13db0e35f..1e5cd1b9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.7.0-beta.6 +## mm/dd/2019 + +1. [](#bugfix) + * Fixed `$page->summary()` always striping HTML tags if the summary was set by `$page->setSummary()` + # v1.7.0-beta.5 ## 08/11/2019 diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index d36f7866a..bc3bccb31 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -610,8 +610,7 @@ class Page implements PageInterface $content = $textOnly ? strip_tags($this->content()) : $this->content(); $summary_size = $this->summary_size; } else { - $content = strip_tags($this->summary); - // Use mb_strwidth to deal with the 2 character widths characters + $content = $textOnly ? strip_tags($this->summary) : $this->summary; $summary_size = mb_strwidth($content, 'utf-8'); }