summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Helper
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-07-12 19:16:14 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-07-12 19:16:14 +0200
commit37a0b8f2ab7ba0371d32e44ad6fb4f09fe1b35b7 (patch)
treea916d5c655de61bc0401f6fa2315b84e9bcc057e /lib/Travelynx/Helper
parent7b01cae7d5b76db82799a8a1618dbb20cfd7dec1 (diff)
Handle another case of funky HAFAS html ("foo <> bar")1.20.3
Diffstat (limited to 'lib/Travelynx/Helper')
-rw-r--r--lib/Travelynx/Helper/HAFAS.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Travelynx/Helper/HAFAS.pm b/lib/Travelynx/Helper/HAFAS.pm
index 84226a4..6fd5c71 100644
--- a/lib/Travelynx/Helper/HAFAS.pm
+++ b/lib/Travelynx/Helper/HAFAS.pm
@@ -207,6 +207,14 @@ sub get_xml_p {
$body
=~ s{<HIMMessage([^>]+)lead="([^"]*)"([^"=>]*)"([^"]*)"}{<Attribute$1text="$2&#042;$3&#042;$4"}s;
+ # ... and <HIMMessage [...] lead="[...]<>[...]">
+ # (replace <> with t$t)
+ while ( $body
+ =~ s{<HIMMessage([^>]+)lead="([^"]*)<>([^"=]*)"}{<HIMMessage$1lead="$2&#11020;$3"}gis
+ )
+ {
+ }
+
# Dito for <HIMMessage [...] lead="[...]<br>[...]">.
while ( $body
=~ s{<HIMMessage([^>]+)lead="([^"]*)<br/?>([^"=]*)"}{<HIMMessage$1lead="$2 $3"}is