summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-03-30 18:29:00 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-03-30 18:29:00 +0200
commit5cd25d442f01e6159fde7814acac5a5c201a3a6c (patch)
treef2cc2f1793d9563b226517a5b9186e1e565f1022 /lib/Travelynx
parent13b4572a2f58231272c7f40add706d561ecf4855 (diff)
hafas: more generic fix for invalid XML1.22.2
Diffstat (limited to 'lib/Travelynx')
-rw-r--r--lib/Travelynx/Helper/HAFAS.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Travelynx/Helper/HAFAS.pm b/lib/Travelynx/Helper/HAFAS.pm
index c4bc66a..a248548 100644
--- a/lib/Travelynx/Helper/HAFAS.pm
+++ b/lib/Travelynx/Helper/HAFAS.pm
@@ -198,8 +198,7 @@ sub get_xml_p {
# More fixes for invalid XML
$body =~ s{P&R}{P&amp;R};
- $body =~ s{Wagen \d+ \K&}{&amp;};
- $body =~ s{Wagen \d+, \d+ \K&}{&amp;};
+ $body =~ s{& }{&amp; }g;
# <Attribute [...] text="[...]"[...]"" /> is invalid XML.
# Work around it.