diff --git a/api/data/NMBS/connections.php b/api/data/NMBS/connections.php index 4c7c74bd..39d75db3 100644 --- a/api/data/NMBS/connections.php +++ b/api/data/NMBS/connections.php @@ -207,8 +207,8 @@ public static function parseHafasXml($serverData, $lang, $fast, $showAlerts = fa $alerts = []; foreach ($conn->IList->I as $info) { $alert = new Alert(); - $alert->header = htmlentities(trim($info['header'])); - $alert->description = htmlentities(trim($info['text'])); + $alert->header = html_entity_decode(htmlentities(trim($info['header']))); + $alert->description = html_entity_decode(htmlentities(trim($info['text']))); array_push($alerts, $alert); } $connection[$i]->alert = $alerts; diff --git a/api/data/NMBS/liveboard.php b/api/data/NMBS/liveboard.php index 09bb06ca..a080b860 100644 --- a/api/data/NMBS/liveboard.php +++ b/api/data/NMBS/liveboard.php @@ -192,8 +192,8 @@ private static function parseData($xml, $time, $lang, $fast = false, $showAlerts $himmessage = $journey->HIMMessage; for ($a = 0; $a < count($himmessage); $a++) { $alert = new Alert(); - $alert->header = htmlentities(trim($himmessage[$a]['header'])); - $alert->description = htmlentities(trim($himmessage[$a]['lead'])); + $alert->header = html_entity_decode(htmlentities(trim($himmessage[$a]['header']))); + $alert->description = html_entity_decode(htmlentities(trim($himmessage[$a]['lead']))); array_push($alerts, $alert); } $nodes[$i]->alert = $alerts; diff --git a/api/data/NMBS/vehicleinformation.php b/api/data/NMBS/vehicleinformation.php index a9068eca..8a0b426c 100644 --- a/api/data/NMBS/vehicleinformation.php +++ b/api/data/NMBS/vehicleinformation.php @@ -219,15 +219,15 @@ private static function getAlerts($html) foreach ($nodes as $alertnode) { $bodysplitter = "*#*"; - $alertbody = strip_tags($alertnode, ',
'); + $alertbody = strip_tags($alertnode, ',
, '); $alertbody = str_replace('
', $bodysplitter, $alertbody); $alertbody = str_replace('', '', $alertbody); $alertelements = explode($bodysplitter, $alertbody); $header = preg_replace("/ |\s*\(.*?\)\s*/i", '', $alertelements[0]); $alert = new Alert(); - $alert->header = htmlentities(trim($header)); - $alert->description = htmlentities(trim($alertelements[1])); + $alert->header = html_entity_decode(htmlentities(trim($header))); + $alert->description = html_entity_decode(htmlentities(trim($alertelements[1]))); array_push($alerts, $alert); }