Add another fix for invalid HAFAS XML
This commit is contained in:
parent
7564ec34db
commit
ee38d48a55
1 changed files with 3 additions and 0 deletions
|
@ -2173,6 +2173,9 @@ sub startup {
|
|||
# <SDay text="... > ..."> 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&R};
|
||||
eval { $tree = XML::LibXML->load_xml( string => $body ) };
|
||||
if ($@) {
|
||||
$self->app->log->warn("load_xml($url): $@");
|
||||
|
|
Loading…
Reference in a new issue