diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-10-25 16:35:22 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-10-25 16:35:22 +0100 |
commit | 5c3f8eae71b8a3eb4f7b5acf96858f861041f5ca (patch) | |
tree | 9a582fce64b1c0896f6e90ec85f59ffb9f685014 /lib/DBInfoscreen/Helper | |
parent | 35d859666eaae436891dec254afa818275989243 (diff) |
Introduce HAFAS XML fix from travelynx3.4.7
Diffstat (limited to 'lib/DBInfoscreen/Helper')
-rw-r--r-- | lib/DBInfoscreen/Helper/HAFAS.pm | 7 |
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&R}; + + # <Attribute [...] text="[...] "[...]"" /> is invalid XML. + # Work around it. $body =~ s{<Attribute([^>]+)text="([^"]*)"([^"=]*)""}{<Attribute$1text="$2*$3*"}s; |