HAFAS: Work around yet another case of invalid XML

This commit is contained in:
Daniel Friesel 2021-06-05 14:17:49 +02:00
parent 16c1d12373
commit 9221ddce85

View file

@ -201,7 +201,11 @@ sub get_xml_p {
# <Attribute [...] text="[...]"[...]"" /> is invalid XML.
# Work around it.
$body
=~ s{<Attribute([^>]+)text="([^"]*)"([^"=]*)""}{<Attribute$1text="$2&#042;$3&#042;"}s;
=~ s{<Attribute([^>]+)text="([^"]*)"([^"=>]*)""}{<Attribute$1text="$2&#042;$3&#042;"}s;
# Same for <HIMMessage lead="[...]"[...]"[...]" />
$body
=~ s{<HIMMessage([^>]+)lead="([^"]*)"([^"=>]*)"([^"]*)"}{<Attribute$1text="$2&#042;$3&#042;$4"}s;
# Dito for <HIMMessage [...] lead="[...]<br>[...]">.
while ( $body