From 7bcdf9cccf23eda6c42e18d9e973207b2dbfe50e Mon Sep 17 00:00:00 2001
From: Dominik Hebeler <dominik@suma-ev.de>
Date: Wed, 6 Jan 2021 14:32:19 +0100
Subject: [PATCH] replaced ellipsis html code with utf8 version

---
 app/Models/Result.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/Models/Result.php b/app/Models/Result.php
index 51e69f0cb..5fef5fd52 100644
--- a/app/Models/Result.php
+++ b/app/Models/Result.php
@@ -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);
-- 
GitLab