I use this global to insert to the space in the Title the sign "-"
So if the Title is "aaa bbb ccc" Title I will get aaa-bbb-ccc
If I have title like this one "aaa- "bbb" c'cc" I want it to be 111-bbb-ccc
How can I insert list of character that the global will clean when create the CleanTitle,
Like ")(-+\><}{][,/.
sub {
my $in = $_[0];
my @cut = split /\n/, $in;
my @got;
# pass in as "name"
# eg FooBar|IN
foreach (@cut) {
chomp;
s/\r//g;
s/\f//g;
my $name = $_;
#$link = $CFG->{build_root_url}.qq{/search/$name};
my $hash;
$hash->{Title} = $_;
$hash->{CleanTitle} = $_;
$hash->{CleanTitle} =~ s/ /-/sig;
push @got, $hash;
}
return { format_page_loop => \@got };
}
So if the Title is "aaa bbb ccc" Title I will get aaa-bbb-ccc
If I have title like this one "aaa- "bbb" c'cc" I want it to be 111-bbb-ccc
How can I insert list of character that the global will clean when create the CleanTitle,
Like ")(-+\><}{][,/.
sub {
my $in = $_[0];
my @cut = split /\n/, $in;
my @got;
# pass in as "name"
# eg FooBar|IN
foreach (@cut) {
chomp;
s/\r//g;
s/\f//g;
my $name = $_;
#$link = $CFG->{build_root_url}.qq{/search/$name};
my $hash;
$hash->{Title} = $_;
$hash->{CleanTitle} = $_;
$hash->{CleanTitle} =~ s/ /-/sig;
push @got, $hash;
}
return { format_page_loop => \@got };
}