diff options
| author | 2018-09-02 13:19:58 +0200 | |
|---|---|---|
| committer | 2018-09-02 13:19:58 +0200 | |
| commit | 32d9c3b7905f4e43ffdf4bf2bf37723cfd18390c (patch) | |
| tree | c2ed9eb08533ae795b1b97718223c6bb614a18e3 /app/Models/Entry.php | |
| parent | 565e34f7bdcc35d946d10a1840f36f40c6804f62 (diff) | |
Use mb_strcut (#1996)
* Use mb_strcut
Avoid cutting in the middle of a multi-byte UTF-8 character
* Forgotten php5-*
* Typo
* Whitespace
* More mb_strcut
Diffstat (limited to 'app/Models/Entry.php')
| -rw-r--r-- | app/Models/Entry.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 2b6059638..ccbad5724 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -31,6 +31,7 @@ class FreshRSS_Entry extends Minz_Model { $this->_isRead($is_read); $this->_isFavorite($is_favorite); $this->_feedId($feedId); + $tags = mb_strcut($tags, 0, 1023, 'UTF-8'); $this->_tags(preg_split('/[\s#]/', $tags)); $this->_guid($guid); } @@ -123,11 +124,11 @@ class FreshRSS_Entry extends Minz_Model { } public function _title($value) { $this->hash = null; - $this->title = $value; + $this->title = mb_strcut($value, 0, 255, 'UTF-8'); } public function _author($value) { $this->hash = null; - $this->author = $value; + $this->author = mb_strcut($value, 0, 255, 'UTF-8'); } public function _content($value) { $this->hash = null; |
