Separate out IPv4 again

This commit is contained in:
Zixaphir 2013-08-14 19:15:46 -07:00
parent 9715424f1f
commit b9581dd428
3 changed files with 7 additions and 4 deletions

View File

@ -4422,7 +4422,7 @@
if (g.VIEW === 'catalog' || !Conf['Linkify']) { if (g.VIEW === 'catalog' || !Conf['Linkify']) {
return; return;
} }
this.regString = /((https?|mailto|git|magnet|ftp|irc):([a-z\d%\/])|[-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|[\d]{1,3}|[a-z]{2})(\/|(?!.))|[-\w\d.@]+@[a-z\d.-]+\.[a-z\d])/i; this.regString = /((https?|mailto|git|magnet|ftp|irc):([a-z\d%\/])|[-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})(\/|(?!.))|[\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']) { if (Conf['Comment Expansion']) {
ExpandComment.callbacks.push(this.node); ExpandComment.callbacks.push(this.node);
} }

View File

@ -4431,7 +4431,7 @@
if (g.VIEW === 'catalog' || !Conf['Linkify']) { if (g.VIEW === 'catalog' || !Conf['Linkify']) {
return; return;
} }
this.regString = /((https?|mailto|git|magnet|ftp|irc):([a-z\d%\/])|[-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|[\d]{1,3}|[a-z]{2})(\/|(?!.))|[-\w\d.@]+@[a-z\d.-]+\.[a-z\d])/i; this.regString = /((https?|mailto|git|magnet|ftp|irc):([a-z\d%\/])|[-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})(\/|(?!.))|[\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']) { if (Conf['Comment Expansion']) {
ExpandComment.callbacks.push(this.node); ExpandComment.callbacks.push(this.node);
} }

View File

@ -9,11 +9,14 @@ Linkify =
[a-z\d%/] [a-z\d%/]
) )
| |
# This should account for virtually all links posted without http:, including IPv4 addresses # This should account for virtually all links posted without http:
[-a-z\d.]+[.]( [-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|[\d]{1,3}|[a-z]{2} 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}
)(/|(?!.)) )(/|(?!.))
| |
# IPv4 Addresses
[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}
|
# E-mails # E-mails
[-\w\d.@]+@[a-z\d.-]+\.[a-z\d] [-\w\d.@]+@[a-z\d.-]+\.[a-z\d]
)///i )///i