From 5c3f8eae71b8a3eb4f7b5acf96858f861041f5ca Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 25 Oct 2020 16:35:22 +0100 Subject: Introduce HAFAS XML fix from travelynx --- lib/DBInfoscreen/Helper/HAFAS.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/DBInfoscreen/Helper') diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm index faf7848..8a88c61 100644 --- a/lib/DBInfoscreen/Helper/HAFAS.pm +++ b/lib/DBInfoscreen/Helper/HAFAS.pm @@ -103,8 +103,11 @@ sub get_xml_p { # regardless. As it is the last tag, we just throw it away. $body =~ s{]*/>}{}s; - # is invalid XML. - # Work around it. + # More fixes for invalid XML + $body =~ s{P&R}{P&R}; + + # is invalid XML. + # Work around it. $body =~ s{]+)text="([^"]*)"([^"=]*)""}{