resolve_sb_template: escape / in station name

This commit is contained in:
Daniel Friesel 2023-03-04 10:55:05 +01:00
parent a7c31b6436
commit 5d20bf155a
No known key found for this signature in database
GPG key ID: 100D5BFB5166E005

View file

@ -1257,9 +1257,10 @@ sub startup {
$self->helper( $self->helper(
'resolve_sb_template' => sub { 'resolve_sb_template' => sub {
my ( $self, $template, %opt ) = @_; 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{[{]eva[}]}{$opt{eva}}g;
$ret =~ s{[{]name[}]}{$opt{name}}g; $ret =~ s{[{]name[}]}{$name}g;
$ret =~ s{[{]tt[}]}{$opt{tt}}g; $ret =~ s{[{]tt[}]}{$opt{tt}}g;
$ret =~ s{[{]tn[}]}{$opt{tn}}g; $ret =~ s{[{]tn[}]}{$opt{tn}}g;
$ret =~ s{[{]id[}]}{$opt{id}}g; $ret =~ s{[{]id[}]}{$opt{id}}g;