From 5d20bf155acd68a2b41c183f63bea3eee1147434 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 4 Mar 2023 10:55:05 +0100 Subject: resolve_sb_template: escape / in station name --- lib/Travelynx.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index f182358..eec8e38 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -1257,9 +1257,10 @@ sub startup { $self->helper( 'resolve_sb_template' => sub { my ( $self, $template, %opt ) = @_; - my $ret = $template; + my $ret = $template; + my $name = $opt{name} =~ s{/}{%2F}gr; $ret =~ s{[{]eva[}]}{$opt{eva}}g; - $ret =~ s{[{]name[}]}{$opt{name}}g; + $ret =~ s{[{]name[}]}{$name}g; $ret =~ s{[{]tt[}]}{$opt{tt}}g; $ret =~ s{[{]tn[}]}{$opt{tn}}g; $ret =~ s{[{]id[}]}{$opt{id}}g; -- cgit v1.2.3