Commit 7bcdf9cc authored by Dominik Hebeler's avatar Dominik Hebeler

replaced ellipsis html code with utf8 version

parent b46708cb
......@@ -33,6 +33,8 @@ class Result
public $new = true;
public $changed = false;
const DESCRIPTION_LENGTH = 150;
# Erstellt ein neues Ergebnis
public function __construct($provider, $titel, $link, $anzeigeLink, $descr, $gefVon, $gefVonLink, $sourceRank, $additionalInformation = [])
{
......@@ -44,10 +46,10 @@ class Result
$this->descr = strip_tags(trim($descr), '<p>');
$this->descr = preg_replace("/\n+/si", " ", $this->descr);
$this->longDescr = $this->descr;
if (strlen($this->descr) > 150) {
$this->descr = wordwrap($this->descr, 150);
if (strlen($this->descr) > self::DESCRIPTION_LENGTH) {
$this->descr = wordwrap($this->descr, self::DESCRIPTION_LENGTH);
$this->descr = substr($this->descr, 0, strpos($this->descr, "\n"));
$this->descr .= "&#8230;"; // Ellipsis character
$this->descr .= ""; // Ellipsis character
}
$this->gefVon[] = trim($gefVon);
$this->gefVonLink[] = trim($gefVonLink);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment