diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-07-12 19:15:55 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-07-12 19:16:06 +0200 |
commit | b1a0853ddf4238c895d86dbfc12d67f4ea6303f2 (patch) | |
tree | 658bf5f610c9841688bac4549179ab77c5689b07 /lib/DBInfoscreen | |
parent | df05c90fc86e375d89fa1d70c917b0e2a25514ae (diff) |
Handle another case of funky HAFAS HTML ("foo <> bar")4.2.2
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r-- | lib/DBInfoscreen/Helper/HAFAS.pm | 8 |
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⬌$3"}gis + ) + { + } + # ... and any other HTML tag inside an XML attribute # (remove them entirely) while ( $body |