summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen/Helper
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-10-25 16:35:22 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-10-25 16:35:22 +0100
commit5c3f8eae71b8a3eb4f7b5acf96858f861041f5ca (patch)
tree9a582fce64b1c0896f6e90ec85f59ffb9f685014 /lib/DBInfoscreen/Helper
parent35d859666eaae436891dec254afa818275989243 (diff)
Introduce HAFAS XML fix from travelynx3.4.7
Diffstat (limited to 'lib/DBInfoscreen/Helper')
-rw-r--r--lib/DBInfoscreen/Helper/HAFAS.pm7
1 files changed, 5 insertions, 2 deletions
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{<SDay [^>]*/>}{}s;
- # <Attribute [...] text="[...] "[...]"" prio="800" /> is invalid XML.
- # Work around it.
+ # More fixes for invalid XML
+ $body =~ s{P&R}{P&amp;R};
+
+ # <Attribute [...] text="[...] "[...]"" /> is invalid XML.
+ # Work around it.
$body
=~ s{<Attribute([^>]+)text="([^"]*)"([^"=]*)""}{<Attribute$1text="$2&#042;$3&#042;"}s;