Open inliquid opened 9 years ago
I'm not familiar with what this is fixing. Are channel descriptions being cut off or not stored correctly? If you could, it'd be helpful if you forked and did a pull request so that we could see a diff of the change.
/core/lib/ETFormat.class.php:120
Should be:
// If the content string is already shorter than this, do nothing.
//if (strlen($this->content) <= $characters) return $this;
if (mb_strlen($this->content,'UTF-8') <= $characters) return $this;
// Cut the content down to the last full word that fits in this number of characters.
//$this->content = substr($this->content, 0, $characters);
//$this->content = substr($this->content, 0, strrpos($this->content, " "));
$this->content = mb_substr($this->content, 0, $characters, 'UTF-8');
$this->content = mb_substr($this->content, 0, mb_strrpos($this->content, " ", 0, 'UTF-8'), 'UTF-8');