summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-02-05 23:17:33 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-02-05 23:17:33 +0100
commitd446b73edd84565948702e3418f17a8c5e04aa9e (patch)
tree24a46e78a84163c96d7fad126742aa6c2bf5b532 /lib
parentd2ecb154f2dd7f9ac0e4cae6fb5d7f2be2404e08 (diff)
HAFAS: Handle <br> tags in HTML attributes3.10.6
Diffstat (limited to 'lib')
-rw-r--r--lib/DBInfoscreen/Helper/HAFAS.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm
index f0da6e7..a7c07c3 100644
--- a/lib/DBInfoscreen/Helper/HAFAS.pm
+++ b/lib/DBInfoscreen/Helper/HAFAS.pm
@@ -120,6 +120,10 @@ sub get_xml_p {
$body
=~ 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;
+
my $tree;
eval { $tree = XML::LibXML->load_xml( string => $body ) };