Skip to content
Snippets Groups Projects
Commit d6ab6350 authored by Christopher Martin's avatar Christopher Martin Committed by Lachlan Ennis
Browse files

Issue #2679977 by ccjjmartin: New top level domains and pattern matching


Signed-off-by: default avatarelachlan <elachlan@gmail.com>
parent 13ef0ee8
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ Drupal.extlink.attach = function (context, settings) {
}
// Strip the host name down, removing ports, subdomains, or www.
var pattern = /^(([^\/:]+?\.)*)([^\.:]{4,})((\.[a-z]{1,4})*)(:[0-9]{1,5})?$/;
var pattern = /^(([^\/:]+?\.)*)([^\.:]{1,})((\.[a-z0-9]{1,253})*)(:[0-9]{1,5})?$/;
var host = window.location.host.replace(pattern, '$3$4');
var subdomain = window.location.host.replace(pattern, '$1');
......
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