Skip to content
Snippets Groups Projects
Commit 29631742 authored by runemaster's avatar runemaster
Browse files

Fix uri's with "&amp:" or "&" in them

i.e.; http://bbs.synchro.net/msgs/msg.ssjs?msg_sub=notices&message=272
Also ... do not use html_decode on href's as that breaks XHTML compliance.
parent 5238b475
No related branches found
No related tags found
No related merge requests found
......@@ -183,9 +183,9 @@ 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\-._\?\,\/\\\+&%\$#\=~\*]*))?[^,.\(\)&\s]/gi,function(str) {
var ret='<a href="'+html_decode(str)+'" target="_blank">'+str+'</a>';
str=str.replace(/(?:http|https|ftp|telnet|gopher|irc|news)\:\/\/[\w\-\.]+\.[a-zA-Z]+(?::[\w]*)?(?:\/(?:[\w\-._\?\,\/\\\+&amp;%\$#\=~\*]*))?[^,.\(\)&\s]/gi,function(str) {
var ret='<a href="'+str+'" target="_blank">'+str+'</a>';
return(ret);}
);
);
return(str);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment