summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2023-03-04 10:55:05 +0100
committerDaniel Friesel <derf@finalrewind.org>2023-03-04 10:55:05 +0100
commit5d20bf155acd68a2b41c183f63bea3eee1147434 (patch)
treebcf1fc48a26fdf1760a042fc0ace6587cfa4066e
parenta7c31b6436302979808029486f66afa29b9f8eb5 (diff)
resolve_sb_template: escape / in station name1.30.4
-rwxr-xr-xlib/Travelynx.pm5
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;