summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-04-24 09:11:18 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-04-24 09:11:18 +0200
commit16c1d12373c5e69efc92a11d0b71ef0d41f29572 (patch)
tree9d4a2d3d1dd7e6fdc8aa1411cc9ba4254e3b3963 /lib/Travelynx
parent810945f8bc9306f4665c4f974cd84d82fad8a495 (diff)
remove arbitrary HTML tags from HAFAS HIMMessage attribute content1.19.13
Diffstat (limited to 'lib/Travelynx')
-rw-r--r--lib/Travelynx/Helper/HAFAS.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Travelynx/Helper/HAFAS.pm b/lib/Travelynx/Helper/HAFAS.pm
index c612238..a7c4abc 100644
--- a/lib/Travelynx/Helper/HAFAS.pm
+++ b/lib/Travelynx/Helper/HAFAS.pm
@@ -205,7 +205,14 @@ sub get_xml_p {
# Dito for <HIMMessage [...] lead="[...]<br>[...]">.
while ( $body
- =~ s{<HIMMessage([^>]+)lead="([^"]*)<br/?>([^"=]*)"}{<HIMMessage$1lead="$2 $3"}s
+ =~ s{<HIMMessage([^>]+)lead="([^"]*)<br/?>([^"=]*)"}{<HIMMessage$1lead="$2 $3"}is
+ )
+ {
+ }
+
+ # ... and any other HTML tag inside an XML attribute
+ while ( $body
+ =~ s{<HIMMessage([^>]+)lead="([^"]*)<[^>]+>([^"=]*)"}{<HIMMessage$1lead="$2$3"}is
)
{
}