Skip to content
Snippets Groups Projects
Commit a653c93f authored by deuce's avatar deuce
Browse files

Allow a double-newline to terminate a URI.

parent 6a099636
No related branches found
No related tags found
No related merge requests found
......@@ -188,11 +188,16 @@ function make_links(str) {
var text=str;
var uri=str;
var extra='';
var m=str.match(/^([\x00-\xff]*?)((?:>|[\r\n,.\)])+)$/);
var m=str.match(/^([\x00-\xff]*?)((?:\r?\n\r?\n).*)$)
if(m!=null) {
str=m[1];
extra=m[2];
}
m=str.match(/^([\x00-\xff]*?)((?:>|[\r\n,.\)])+)$/);
if(m!=null) {
text=m[1];
uri=m[1];
extra=m[2];
extra=m[2]+extra;
}
uri=uri.replace(/[\r\n]/g,'');
var ret='<a href="'+uri+'" target="_blank">'+text+'</a>'+extra;
......
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