From 452307e938491064e379a642faeb2afcc46e7825 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 28 Aug 2023 21:49:21 +0200 Subject: hafas stationboard: quote city name in regex (fixes bug with "()" etc.) --- lib/DBInfoscreen/Controller/Stationboard.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/DBInfoscreen') diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index eb2badb..f3963d0 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -1656,11 +1656,11 @@ sub handle_result { train_no => $result->number, journey_id => $result->id, via => [ - map { $_->{name} =~ s{,$city}{}r } + map { $_->{name} =~ s{,\Q$city\E}{}r } $result->route_interesting(3) ], - destination => $result->route_end =~ s{,$city}{}r, - origin => $result->route_end =~ s{,$city}{}r, + destination => $result->route_end =~ s{,\Q$city\E}{}r, + origin => $result->route_end =~ s{,\Q$city\E}{}r, platform => $result->platform, scheduled_platform => $result->sched_platform, info => $info, -- cgit v1.2.3