The characters )>,; are not part of an URL

Submitted by: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
This commit is contained in:
Wolfram Schneider 1997-11-04 13:00:05 +00:00
parent 1a8410604b
commit 7b590c20f9
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=2143
2 changed files with 4 additions and 4 deletions

View file

@ -4,7 +4,7 @@
#
# url.cgi - make plain text URLs clickable
#
# $Id: url.cgi,v 1.1 1997-10-11 15:58:11 wosch Exp $
# $Id: url.cgi,v 1.2 1997-11-04 13:00:05 wosch Exp $
PATH=/bin:/usr/bin:/usr/local/bin; export PATH
@ -22,7 +22,7 @@ then
printf "Content-type: text/html\n\n<HTML><BODY><pre>\n"
lynx -source "$url" |
perl -npe 's/</&lt;/g;
s%(http://[^\s"]+)%<A HREF="$1">$1</A>%g;
s%(http://[^\s"\)\>,;]+)%<A HREF="$1">$1</A>%g;
s%([\w\-\.]+\@[\w\-\.]+\.[a-z]+)%<A HREF="mailto:$1">$1</A>%g;'
echo "</pre></BODY></HTML>"

View file

@ -4,7 +4,7 @@
#
# url.cgi - make plain text URLs clickable
#
# $Id: url.cgi,v 1.1 1997-10-11 15:58:11 wosch Exp $
# $Id: url.cgi,v 1.2 1997-11-04 13:00:05 wosch Exp $
PATH=/bin:/usr/bin:/usr/local/bin; export PATH
@ -22,7 +22,7 @@ then
printf "Content-type: text/html\n\n<HTML><BODY><pre>\n"
lynx -source "$url" |
perl -npe 's/</&lt;/g;
s%(http://[^\s"]+)%<A HREF="$1">$1</A>%g;
s%(http://[^\s"\)\>,;]+)%<A HREF="$1">$1</A>%g;
s%([\w\-\.]+\@[\w\-\.]+\.[a-z]+)%<A HREF="mailto:$1">$1</A>%g;'
echo "</pre></BODY></HTML>"