From 62af4ce5c0ca764324bfdb6f55b1fbaa7b46b3cd Mon Sep 17 00:00:00 2001 From: deuce <> Date: Thu, 16 Mar 2006 02:54:47 +0000 Subject: [PATCH] More fixes/refinements. Boy, zero-width negative look-behind would be handy here... ie: (?<! --- web/lib/msgslib.ssjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/lib/msgslib.ssjs b/web/lib/msgslib.ssjs index 4adf56c03b..6389d4e344 100644 --- a/web/lib/msgslib.ssjs +++ b/web/lib/msgslib.ssjs @@ -186,7 +186,7 @@ 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 | var ret='<a href="'+str+'" target="_blank">'+str+'</a>'; - var m=str.match(/^(.*)(>|[^,.\(\)\s])$/); + var m=str.match(/^(.*)(>|[,.\)])$/); if(m!=null) ret='<a href="'+m[1]+'" target="_blank">'+m[1]+'</a>'+m[2]; return(ret);} -- GitLab