Fixed $page->summary() always striping HTML tags if the summary was set by $page->setSummary()

This commit is contained in:
Matias Griese 2019-08-15 19:37:19 +03:00
parent 14eaa4d00a
commit 9ed3da3df2
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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');
}