mirror of
https://github.com/getgrav/grav.git
synced 2026-07-09 05:32:17 +02:00
Fixed Page::summary() when using delimiter and multibyte UTF8 Characters #1644
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# v1.3.4
|
||||
## xx/xx/2017
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fixed `Page::summary()` when using delimiter and multibyte UTF8 Characters [#1644](https://github.com/getgrav/grav/issues/1644)
|
||||
|
||||
# v1.3.3
|
||||
## 09/07/2017
|
||||
|
||||
@@ -19,7 +25,7 @@
|
||||
* Updated vendor libraries
|
||||
* Updated `travis.yml` to add support for PHP 7.1 as well as 7.0.21 for test suite
|
||||
1. [](#bugfix)
|
||||
* Fixed UTF8 2 character support in `Page::summary()` [#1554](https://github.com/getgrav/grav/issues/1554)
|
||||
* Fixed UTF8 multibyte UTF8 character support in `Page::summary()` [#1554](https://github.com/getgrav/grav/issues/1554)
|
||||
|
||||
# v1.3.2
|
||||
## 08/16/2017
|
||||
|
||||
@@ -520,7 +520,7 @@ class Page
|
||||
} elseif (($format === 'short') && isset($summary_size)) {
|
||||
// Use mb_strimwidth to slice the string
|
||||
if (mb_strwidth($content, 'utf8') > $summary_size) {
|
||||
return mb_strimwidth($content, 0, $summary_size);
|
||||
return mb_substr($content, 0, $summary_size);
|
||||
} else {
|
||||
return $content;
|
||||
}
|
||||
@@ -2269,7 +2269,7 @@ class Page
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the item in the current position.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user