summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-07-12 19:15:55 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-07-12 19:16:06 +0200
commitb1a0853ddf4238c895d86dbfc12d67f4ea6303f2 (patch)
tree658bf5f610c9841688bac4549179ab77c5689b07
parentdf05c90fc86e375d89fa1d70c917b0e2a25514ae (diff)
Handle another case of funky HAFAS HTML ("foo <> bar")4.2.2
-rw-r--r--lib/DBInfoscreen/Helper/HAFAS.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm
index 3faf3c7..4a3c3e7 100644
--- a/lib/DBInfoscreen/Helper/HAFAS.pm
+++ b/lib/DBInfoscreen/Helper/HAFAS.pm
@@ -138,6 +138,14 @@ sub get_xml_p {
{
}
+ # ... and <HIMMessage [...] lead="[...]<>[...]">
+ # (replace <> with t$t)
+ while ( $body
+ =~ s{<HIMMessage([^>]+)lead="([^"]*)<>([^"=]*)"}{<HIMMessage$1lead="$2&#11020;$3"}gis
+ )
+ {
+ }
+
# ... and any other HTML tag inside an XML attribute
# (remove them entirely)
while ( $body