Skip to content
Snippets Groups Projects
Commit bfa24697 authored by Joe Parsons's avatar Joe Parsons Committed by Lachlan Ennis
Browse files

Issue #3004486 by joegraduate: URLs containing port numbers break external link detection

parent d26db48f
No related branches found
No related tags found
Loading
......@@ -15,7 +15,7 @@
// Strip the host name down, removing ports, subdomains, or www.
var pattern = /^(([^\/:]+?\.)*)([^\.:]{1,})((\.[a-z0-9]{1,253})*)(:[0-9]{1,5})?$/;
var host = window.location.host.replace(pattern, '$2$3');
var host = window.location.host.replace(pattern, '$2$3$6');
var subdomain = window.location.host.replace(host, '');
// Determine what subdomains are considered internal.
......
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