HAFAS: Remove all illegal linebreaks from attributes, not just the first
This commit is contained in:
parent
6c015a91b8
commit
3f33341a2e
1 changed files with 5 additions and 2 deletions
|
@ -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 = $@ ) {
|
||||
|
|
Loading…
Reference in a new issue