diff options
Diffstat (limited to 'lib/DBInfoscreen/Controller')
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index a28a523..67fd727 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -146,6 +146,10 @@ sub hafas_xml_req { my $body = decode( 'ISO-8859-15', $res->body ); + # <SDay text="... > ..."> is invalid HTML, but present + # regardless. As it is the last tag, we just throw it away. + $body =~ s{<SDay .*}{</Journey>}s; + my $tree; eval { $tree = XML::LibXML->load_xml( string => $body ) }; |