Handle another case of funky HAFAS html ("foo <> bar")

This commit is contained in:
Daniel Friesel 2021-07-12 19:16:14 +02:00
parent 7b01cae7d5
commit 37a0b8f2ab

View file

@ -207,6 +207,14 @@ sub get_xml_p {
$body $body
=~ s{<HIMMessage([^>]+)lead="([^"]*)"([^"=>]*)"([^"]*)"}{<Attribute$1text="$2&#042;$3&#042;$4"}s; =~ 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>[...]">. # Dito for <HIMMessage [...] lead="[...]<br>[...]">.
while ( $body while ( $body
=~ s{<HIMMessage([^>]+)lead="([^"]*)<br/?>([^"=]*)"}{<HIMMessage$1lead="$2 $3"}is =~ s{<HIMMessage([^>]+)lead="([^"]*)<br/?>([^"=]*)"}{<HIMMessage$1lead="$2 $3"}is