summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r--lib/DBInfoscreen/Helper/HAFAS.pm8
1 files changed, 6 insertions, 2 deletions
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&(?= )}{&};
- # <Attribute [...] text="[...] "[...]"" /> is invalid XML.
+ # <Attribute [...] text="[...]"[...]"" /> is invalid XML.
# Work around it.
$body
- =~ s{<Attribute([^>]+)text="([^"]*)"([^"=]*)""}{<Attribute$1text="$2&#042;$3&#042;"}s;
+ =~ s{<Attribute([^>]+)text="([^"]*)"([^"=>]*)""}{<Attribute$1text="$2&#042;$3&#042;"}s;
+
+ # Same for <HIMMessage lead="[...]"[...]"[...]" />
+ $body
+ =~ s{<HIMMessage([^>]+)lead="([^"]*)"([^"=>]*)"([^"]*)"}{<Attribute$1text="$2&#042;$3&#042;$4"}s;
# Dito for <HIMMessage [...] lead="[...]<br>[...]">
# (replace line breaks with space)