I think this is safer.
This commit is contained in:
parent
a6f6f44d58
commit
b60ddfe907
@ -4300,7 +4300,7 @@
|
|||||||
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
|
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.regString = Conf['Allow False Positives'] ? /(\b([a-z]+:\/\/|[a-z]{3,}\.[-a-z0-9]+\.[a-z]|[-a-z0-9]+\.[a-z]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]|[a-z]{3,}:[a-z0-9?]|[\S]+@[a-z0-9.-]+\.[a-z0-9])[^\s'"]+)/gi : /(((magnet|mailto)\:|(www\.)|(news|(ht|f)tp(s?))\:\/\/){1}\S+)/gi;
|
this.regString = Conf['Allow False Positives'] ? /(\b([a-z]+:\/\/|[a-z]{3,}\.[-a-z0-9]+\.[a-z]|[-a-z0-9]+\.[a-z]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]|[a-z]{3,}:[a-z0-9?]|[^\s@]+@[a-z0-9.-]+\.[a-z0-9])[^\s'"]+)/gi : /(((magnet|mailto)\:|(www\.)|(news|(ht|f)tp(s?))\:\/\/){1}\S+)/gi;
|
||||||
if (Conf['Comment Expansion']) {
|
if (Conf['Comment Expansion']) {
|
||||||
ExpandComment.callbacks.push(this.node);
|
ExpandComment.callbacks.push(this.node);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4302,7 +4302,7 @@
|
|||||||
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
|
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.regString = Conf['Allow False Positives'] ? /(\b([a-z]+:\/\/|[a-z]{3,}\.[-a-z0-9]+\.[a-z]|[-a-z0-9]+\.[a-z]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]|[a-z]{3,}:[a-z0-9?]|[\S]+@[a-z0-9.-]+\.[a-z0-9])[^\s'"]+)/gi : /(((magnet|mailto)\:|(www\.)|(news|(ht|f)tp(s?))\:\/\/){1}\S+)/gi;
|
this.regString = Conf['Allow False Positives'] ? /(\b([a-z]+:\/\/|[a-z]{3,}\.[-a-z0-9]+\.[a-z]|[-a-z0-9]+\.[a-z]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]|[a-z]{3,}:[a-z0-9?]|[^\s@]+@[a-z0-9.-]+\.[a-z0-9])[^\s'"]+)/gi : /(((magnet|mailto)\:|(www\.)|(news|(ht|f)tp(s?))\:\/\/){1}\S+)/gi;
|
||||||
if (Conf['Comment Expansion']) {
|
if (Conf['Comment Expansion']) {
|
||||||
ExpandComment.callbacks.push(this.node);
|
ExpandComment.callbacks.push(this.node);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ Linkify =
|
|||||||
|
|
|
|
||||||
[a-z]{3,}:[a-z0-9?]
|
[a-z]{3,}:[a-z0-9?]
|
||||||
|
|
|
|
||||||
[\S]+@[a-z0-9.-]+\.[a-z0-9]
|
[^\s@]+@[a-z0-9.-]+\.[a-z0-9]
|
||||||
)
|
)
|
||||||
[^\s'"]+
|
[^\s'"]+
|
||||||
)///gi
|
)///gi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user