diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-02-05 23:17:33 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-02-05 23:17:33 +0100 |
commit | d446b73edd84565948702e3418f17a8c5e04aa9e (patch) | |
tree | 24a46e78a84163c96d7fad126742aa6c2bf5b532 /lib | |
parent | d2ecb154f2dd7f9ac0e4cae6fb5d7f2be2404e08 (diff) |
HAFAS: Handle <br> tags in HTML attributes3.10.6
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DBInfoscreen/Helper/HAFAS.pm | 4 |
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*$3*"}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 ) }; |