From d34c0f95cbddaca0302535669e8e00524b8ee211 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 5 Jun 2021 14:16:51 +0200 Subject: HAFAS: work around yet another case of invalid XML --- lib/DBInfoscreen/Helper/HAFAS.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm index 84e42c3..3faf3c7 100644 --- a/lib/DBInfoscreen/Helper/HAFAS.pm +++ b/lib/DBInfoscreen/Helper/HAFAS.pm @@ -121,10 +121,14 @@ sub get_xml_p { $body =~ s{P&R}{P&R}; $body =~ s{Wagen \d+ \K&(?= )}{&}; - # is invalid XML. + # is invalid XML. # Work around it. $body - =~ s{]+)text="([^"]*)"([^"=]*)""}{]+)text="([^"]*)"([^"=>]*)""}{ + $body + =~ s{]+)lead="([^"]*)"([^"=>]*)"([^"]*)"}{ # (replace line breaks with space) -- cgit v1.2.3