From 9221ddce85fadf1ae98530b524ae81ab726d133e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 5 Jun 2021 14:17:49 +0200 Subject: HAFAS: Work around yet another case of invalid XML --- lib/Travelynx/Helper/HAFAS.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/Travelynx/Helper') diff --git a/lib/Travelynx/Helper/HAFAS.pm b/lib/Travelynx/Helper/HAFAS.pm index a7c4abc..84226a4 100644 --- a/lib/Travelynx/Helper/HAFAS.pm +++ b/lib/Travelynx/Helper/HAFAS.pm @@ -198,10 +198,14 @@ sub get_xml_p { $body =~ s{Wagen \d+ \K&}{&}; $body =~ s{Wagen \d+, \d+ \K&}{&}; - # is invalid XML. + # is invalid XML. # Work around it. $body - =~ s{]+)text="([^"]*)"([^"=]*)""}{]+)text="([^"]*)"([^"=>]*)""}{ + $body + =~ s{]+)lead="([^"]*)"([^"=>]*)"([^"]*)"}{. while ( $body -- cgit v1.2.3