summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Helper/HAFAS.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-02-06 18:06:09 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-02-06 18:06:09 +0100
commit3f33341a2e848bbf31a083aaf07672136f73ec40 (patch)
tree69c2ad2298870a7a7a26141537b57280e2399d0e /lib/Travelynx/Helper/HAFAS.pm
parent6c015a91b89b19117fbad861b271db377a661739 (diff)
HAFAS: Remove all illegal linebreaks from attributes, not just the first1.19.6
Diffstat (limited to 'lib/Travelynx/Helper/HAFAS.pm')
-rw-r--r--lib/Travelynx/Helper/HAFAS.pm7
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&#042;$3&#042;"}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 = $@ ) {