This should match *all* top level domains

This commit is contained in:
Zixaphir 2013-08-14 18:32:34 -07:00
parent 9d1daeaf6e
commit 34ece16aaa
3 changed files with 4 additions and 5 deletions

View File

@ -4422,7 +4422,7 @@
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
return;
}
this.regString = /((https?|mailto|git|magnet|ftp|irc):([a-z\d%\/])|www\d{0,3}[.]|[-a-z\d.]+[.](com|net|org|jp|us|uk|ru|be|tv|xxx|edu|gov|cd|es|de|se|tk|dk|io|fm|fi|mp|ly|info)(?![\d\w])|[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}|[-\w\d.@]+@[a-z\d.-]+\.[a-z\d])/i;
this.regString = /((https?|mailto|git|magnet|ftp|irc):([a-z\d%\/])|www\d{0,3}[.]|[-a-z\d.]+[.](aero|asia|biz|cat|com|coop|info|int|jobs|mobi|museum|name|net|org|post|pro|tel|travel|xxx|edu|gov|mil|[a-z]{2})(\/|\z)|[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}|[-\w\d.@]+@[a-z\d.-]+\.[a-z\d])/i;
if (Conf['Comment Expansion']) {
ExpandComment.callbacks.push(this.node);
}

View File

@ -4431,7 +4431,7 @@
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
return;
}
this.regString = /((https?|mailto|git|magnet|ftp|irc):([a-z\d%\/])|www\d{0,3}[.]|[-a-z\d.]+[.](com|net|org|jp|us|uk|ru|be|tv|xxx|edu|gov|cd|es|de|se|tk|dk|io|fm|fi|mp|ly|info)(?![\d\w])|[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}|[-\w\d.@]+@[a-z\d.-]+\.[a-z\d])/i;
this.regString = /((https?|mailto|git|magnet|ftp|irc):([a-z\d%\/])|www\d{0,3}[.]|[-a-z\d.]+[.](aero|asia|biz|cat|com|coop|info|int|jobs|mobi|museum|name|net|org|post|pro|tel|travel|xxx|edu|gov|mil|[a-z]{2})(\/|\z)|[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}|[-\w\d.@]+@[a-z\d.-]+\.[a-z\d])/i;
if (Conf['Comment Expansion']) {
ExpandComment.callbacks.push(this.node);
}

View File

@ -12,10 +12,9 @@ Linkify =
www\d{0,3}[.]
|
# This should account for virtually all links posted without www or http:
# If it misses any, screw it. No, I will not add canv.as
[-a-z\d.]+[.](
com|net|org|jp|us|uk|ru|be|tv|xxx|edu|gov|cd|es|de|se|tk|dk|io|fm|fi|mp|ly|info
)(?![\d\w])
aero|asia|biz|cat|com|coop|info|int|jobs|mobi|museum|name|net|org|post|pro|tel|travel|xxx|edu|gov|mil|[a-z]{2}
)(/|\z)
|
# IPv4 Addresses
[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}