summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen/Controller/Stationboard.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-08-28 21:49:21 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-08-28 21:49:21 +0200
commit452307e938491064e379a642faeb2afcc46e7825 (patch)
treef5403b2dc864305c3f4b6ad16e31cf2f2393de60 /lib/DBInfoscreen/Controller/Stationboard.pm
parentefe3e6914f65e62fc96d1ba879ac11667ff0273f (diff)
hafas stationboard: quote city name in regex (fixes bug with "()" etc.)4.16.11
Diffstat (limited to 'lib/DBInfoscreen/Controller/Stationboard.pm')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm6
1 files changed, 3 insertions, 3 deletions
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,