Support ftp links.

Add a ending slash to a directory.
This commit is contained in:
Wolfram Schneider 1998-04-01 18:48:32 +00:00
parent 83ed666ce2
commit 950208bb30
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=2633
2 changed files with 6 additions and 6 deletions

View file

@ -26,7 +26,7 @@
#
# url.cgi - make plain text URLs clickable
#
# $Id: url.cgi,v 1.4 1998-04-01 18:24:19 wosch Exp $
# $Id: url.cgi,v 1.5 1998-04-01 18:48:32 wosch Exp $
require LWP::UserAgent;
@ -59,7 +59,7 @@ if ($response -> is_success) {
my($content) = $response -> content;
$content =~ s/</&lt;/g;
$content =~
s%(http://[^\s"\)\>,;]+)%<A HREF="$1">$1</A>%g;
s%((http|ftp)://[^\s"\)\>,;]+)%<A HREF="$1">$1</A>%gi;
print $content;
print "</pre>\n";
@ -67,7 +67,7 @@ if ($response -> is_success) {
if ($file =~
m%pub/FreeBSD/FreeBSD-current/(ports/[^/]+/[^/]+)/pkg/DESCR$%) {
print qq{<HR><a href=\"pds.cgi?$1">Sources</a>\n};
print qq{| <a href="../ports">Help</a>\n};
print qq{| <a href="../ports/">Help</a>\n};
print qq{<BR>\n};
}
print &html_footer;

View file

@ -26,7 +26,7 @@
#
# url.cgi - make plain text URLs clickable
#
# $Id: url.cgi,v 1.4 1998-04-01 18:24:19 wosch Exp $
# $Id: url.cgi,v 1.5 1998-04-01 18:48:32 wosch Exp $
require LWP::UserAgent;
@ -59,7 +59,7 @@ if ($response -> is_success) {
my($content) = $response -> content;
$content =~ s/</&lt;/g;
$content =~
s%(http://[^\s"\)\>,;]+)%<A HREF="$1">$1</A>%g;
s%((http|ftp)://[^\s"\)\>,;]+)%<A HREF="$1">$1</A>%gi;
print $content;
print "</pre>\n";
@ -67,7 +67,7 @@ if ($response -> is_success) {
if ($file =~
m%pub/FreeBSD/FreeBSD-current/(ports/[^/]+/[^/]+)/pkg/DESCR$%) {
print qq{<HR><a href=\"pds.cgi?$1">Sources</a>\n};
print qq{| <a href="../ports">Help</a>\n};
print qq{| <a href="../ports/">Help</a>\n};
print qq{<BR>\n};
}
print &html_footer;