Fix PR: docs/35222 getmsg.cgi: mailing list archive URL regexp
This commit is contained in:
parent
24cea0ffec
commit
368331d6bf
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=30489
1 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
||||||
# by John Fieber
|
# by John Fieber
|
||||||
# February 26, 1998
|
# February 26, 1998
|
||||||
#
|
#
|
||||||
# $FreeBSD: www/en/cgi/getmsg.cgi,v 1.41 2006/11/12 18:37:34 wosch Exp $
|
# $FreeBSD: www/en/cgi/getmsg.cgi,v 1.42 2007/02/19 19:20:35 wosch Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
require "./cgi-lib.pl";
|
require "./cgi-lib.pl";
|
||||||
|
@ -230,7 +230,7 @@ sub strip_url
|
||||||
|
|
||||||
# strip trailing characters
|
# strip trailing characters
|
||||||
$url =~ s/>?$//;
|
$url =~ s/>?$//;
|
||||||
$url =~ s/[.,;>\s]*$//;
|
$url =~ s/[.,;>\s\)]*$//;
|
||||||
|
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ sub AddAnchors
|
||||||
my ($text) = @_;
|
my ($text) = @_;
|
||||||
my $cvsweb = 'http://cvsweb.FreeBSD.org';
|
my $cvsweb = 'http://cvsweb.FreeBSD.org';
|
||||||
|
|
||||||
$text =~ s/(http|https|ftp|gopher|mailto|news|file)(:[\S]*?\/?)(\W?\s)/sprintf("<a href=\"%s\">%s<\/a>$3", &strip_url("$1$2"), &strip_url("$1$2"), $3)/egoi;
|
$text =~ s/(http|https|ftp)(:[\S]*?\/?)(\W?\s)/sprintf("<a href=\"%s\">%s<\/a>$3", &strip_url("$1$2"), "$1$2", $3)/egoi;
|
||||||
|
|
||||||
if ($text =~ /Revision\s+Changes\s+Path/) {
|
if ($text =~ /Revision\s+Changes\s+Path/) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue