]>
BookStack Code Mirror - bookstack/commitdiff
projects
/
bookstack
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
61577cf
)
Fixed page listing excerpts not showing due to encoding issues
author
Dan Brown
<redacted>
Sun, 21 Feb 2016 13:15:46 +0000
(13:15 +0000)
committer
Dan Brown
<redacted>
Sun, 21 Feb 2016 13:15:46 +0000
(13:15 +0000)
app/Page.php
patch
|
blob
|
history
diff --git
a/app/Page.php
b/app/Page.php
index bd5f3bafe33eb0b3c3cf295a8502d5b750a9f1b6..53724ec20d5921fcea668f3abaa54ef3440daa5e 100644
(file)
--- a/
app/Page.php
+++ b/
app/Page.php
@@
-45,7
+45,8
@@
class Page extends Entity
public function getExcerpt($length = 100)
{
- return strlen($this->text) > $length ? substr($this->text, 0, $length-3) . '...' : $this->text;
+ $text = strlen($this->text) > $length ? substr($this->text, 0, $length-3) . '...' : $this->text;
+ return mb_convert_encoding($text, 'UTF-8');
}
}