Commit d34c0f95 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

HAFAS: work around yet another case of invalid XML

parent 2be390cb
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -124,7 +124,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>[...]">
			# (replace line breaks with space)