From 9c254d07f458c9cdb99e29d57188285fa952dd18 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Thu, 16 Mar 2006 03:03:21 +0000 Subject: [PATCH] Clarify comment, clean up regexp. Only allow numeric port specifications. --- web/lib/msgslib.ssjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/lib/msgslib.ssjs b/web/lib/msgslib.ssjs index 62dac55df7..436f5f28bf 100644 --- a/web/lib/msgslib.ssjs +++ b/web/lib/msgslib.ssjs @@ -183,8 +183,8 @@ function idx_to_user(fromidx) } function make_links(str) { - str=str.replace(/(?:http|https|ftp|telnet|gopher|irc|news):\/\/[\w\-\.]+\.[a-zA-Z]+(?::[\w]*)?(?:\/(?:[\w\-._\?\,\/\\\+&;%\$#\=~\*]*))?/gi,function(str) { -// | Protocol |Hostname | Path | + str=str.replace(/(?:http|https|ftp|telnet|gopher|irc|news):\/\/[\w\-\.]+\.[a-zA-Z]+(?::[0-9]*)?(?:\/(?:[\w\-._\?\,\/\\\+&;%\$#\=~\*]*))?/gi,function(str) { +// | Protocol |Hostname |TLD | Port | Path | var ret='<a href="'+str+'" target="_blank">'+str+'</a>'; var m=str.match(/^(.*)(>|[,.\)])$/); if(m!=null) -- GitLab