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

Add another fix for invalid HAFAS XML

parent 7564ec34
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2173,6 +2173,9 @@ sub startup {
					# <SDay text="... &gt; ..."> is invalid HTML, but present in
					# regardless. As it is the last tag, we just throw it away.
					$body =~ s{<SDay [^>]*/>}{}s;

					# More fixes for invalid XML
					$body =~ s{P&R}{P&amp;R};
					eval { $tree = XML::LibXML->load_xml( string => $body ) };
					if ($@) {
						$self->app->log->warn("load_xml($url): $@");