diff options
Diffstat (limited to 'lib/Travelynx')
-rw-r--r-- | lib/Travelynx/Helper/HAFAS.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Travelynx/Helper/HAFAS.pm b/lib/Travelynx/Helper/HAFAS.pm index 77bd52b..e04245b 100644 --- a/lib/Travelynx/Helper/HAFAS.pm +++ b/lib/Travelynx/Helper/HAFAS.pm @@ -203,8 +203,11 @@ sub get_xml_p { =~ s{<Attribute([^>]+)text="([^"]*)"([^"=]*)""}{<Attribute$1text="$2*$3*"}s; # Dito for <HIMMessage [...] lead="[...]<br>[...]">. - $body - =~ s{<HIMMessage([^>]+)lead="([^"]*)<br/?>([^"=]*)"}{<HIMMessage$1lead="$2 $3"}s; + while ( $body + =~ s{<HIMMessage([^>]+)lead="([^"]*)<br/?>([^"=]*)"}{<HIMMessage$1lead="$2 $3"}s + ) + { + } eval { $tree = XML::LibXML->load_xml( string => $body ) }; if ( my $err = $@ ) { |