sub new { bless {}, $_[0] }
sub linkify_1 {
- $_[1] =~ s!$LINK_RE!
+ $_[1] =~ s^$LINK_RE^
my $beg = $1 || '';
my $url = $2;
my $end = '';
}
} elsif ($url =~ s/([\.,;])\z//) {
$end = $1;
+ } elsif ($url !~ /\(/ && $url =~ s/\)\z//) {
+ $end = ')';
}
# salt this, as this could be exploited to show
$url =~ s/&/&/g;
$_[0]->{$key} = $url;
$beg . 'PI-LINK-'. $key . $end;
- !ge;
+ ^ge;
$_[1];
}