hafas: more generic fix for invalid XML

This commit is contained in:
Daniel Friesel 2022-03-30 18:29:00 +02:00
parent 13b4572a2f
commit 5cd25d442f
No known key found for this signature in database
GPG key ID: 100D5BFB5166E005

View file

@ -198,8 +198,7 @@ sub get_xml_p {
# More fixes for invalid XML # More fixes for invalid XML
$body =~ s{P&R}{P&R}; $body =~ s{P&R}{P&R};
$body =~ s{Wagen \d+ \K&}{&}; $body =~ s{& }{& }g;
$body =~ s{Wagen \d+, \d+ \K&}{&};
# <Attribute [...] text="[...]"[...]"" /> is invalid XML. # <Attribute [...] text="[...]"[...]"" /> is invalid XML.
# Work around it. # Work around it.