Skip to content

Commit

Permalink
Fix issue in calling page.summary when no content is present in a page
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviocopes committed Sep 9, 2016
1 parent 8ca1d31 commit 9a68f07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,9 +4,10 @@
1. [](#improved)
* Refactored `onPageNotFound` event to fire after `onPageInitialized`
* Follow symlinks in `Folder::all()`
* Twig variable `base_url` now supports multi-site by path feature
* Twig variable `base_url` now supports multi-site by path feature
1. [](#bugfix)
* Quietly skip missing streams in `Cache::clearCache()`
* Fix issue in calling page.summary when no content is present in a page

# v1.1.4
## 09/07/2016
Expand Down
4 changes: 4 additions & 0 deletions system/src/Grav/Common/Helpers/Truncator.php
Expand Up @@ -123,6 +123,10 @@ public static function truncateLetters($html, $limit = 0, $ellipsis = "")
*/
public static function htmlToDomDocument($html)
{
if (!$html) {
$html = '<p></p>';
}

// Transform multibyte entities which otherwise display incorrectly.
$html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');

Expand Down

0 comments on commit 9a68f07

Please sign in to comment.