From 5b38f6746917ed3344d8718a0b7246484085aac3 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Thu, 16 Mar 2006 02:52:41 +0000
Subject: [PATCH] Attempt to conform the the RuneMaster URI spec.

---
 web/lib/msgslib.ssjs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/web/lib/msgslib.ssjs b/web/lib/msgslib.ssjs
index 56139778fd..4adf56c03b 100644
--- a/web/lib/msgslib.ssjs
+++ b/web/lib/msgslib.ssjs
@@ -183,9 +183,10 @@ 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\-._\?\,\/\\\+&amp;%\$#\=~\*]*))?[^,.\(\)\s]/gi,function(str) {
+	str=str.replace(/(?:http|https|ftp|telnet|gopher|irc|news):\/\/[\w\-\.]+\.[a-zA-Z]+(?::[\w]*)?(?:\/(?:[\w\-._\?\,\/\\\+&amp;%\$#\=~\*]*))?/gi,function(str) {
+//					 | Protocol                                    |Hostname					  | Path                                     |
 		var ret='<a href="'+str+'" target="_blank">'+str+'</a>';
-		var m=str.match(/^(.*)(&gt;.*)$/);
+		var m=str.match(/^(.*)(&gt;|[^,.\(\)\s])$/);
 		if(m!=null)
 			ret='<a href="'+m[1]+'" target="_blank">'+m[1]+'</a>'+m[2];
 		return(ret);}
-- 
GitLab