Handle invalid HAFAS XML containing "Wagen \d+ & \d+"
This commit is contained in:
parent
5e29b99d61
commit
db39b2a177
1 changed files with 2 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
package Travelynx::Helper::HAFAS;
|
||||
|
||||
# Copyright (C) 2020 Daniel Friesel
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
@ -194,6 +195,7 @@ sub get_xml_p {
|
|||
|
||||
# More fixes for invalid XML
|
||||
$body =~ s{P&R}{P&R};
|
||||
$body =~ s{Wagen \d+ \K&(?= )}{&};
|
||||
|
||||
# <Attribute [...] text="[...] "[...]"" /> is invalid XML.
|
||||
# Work around it.
|
||||
|
|
Loading…
Reference in a new issue