diff options
author | Daniel Friesel <derf@finalrewind.org> | 2023-03-04 10:55:05 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2023-03-04 10:55:05 +0100 |
commit | 5d20bf155acd68a2b41c183f63bea3eee1147434 (patch) | |
tree | bcf1fc48a26fdf1760a042fc0ace6587cfa4066e | |
parent | a7c31b6436302979808029486f66afa29b9f8eb5 (diff) |
resolve_sb_template: escape / in station name1.30.4
-rwxr-xr-x | lib/Travelynx.pm | 5 |
1 files 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; |