I checked the "Consider subdomains internal" box, but it doesn't seem to work. My link to https://sharepoint.clatsopcc.edu is still flagged external, and my link to http://lrc.clatsopcc.edu is flagged as external. =(

CommentFileSizeAuthor
#3 extlink_port_numbers.patch1022 bytesquicksketch

Comments

jlea9378’s picture

It just occurred to me that this might be because my drupal environment runs on port 8000 as opposed to port 80, so perhaps it doesn't like that?

quicksketch’s picture

Title: "Consider subdomains internal" box doesn't work » "Consider subdomains internal" box doesn't work on non-standard ports (8000, 8080, etc.)

That sounds like the case. Here's our regex for finding a subdomain:

/^(([^\/]+?\.)*)([^\.]{4,})((\.[a-z]{1,4})*)$/

In short, the only important part is the regex requires starting with some subdomain and ends with a set of 1-4 character top-level domains (com, org, co.uk, etc.) It does not account for port numbers, meaning we can probably add this with something like:

/^(([^\/]+?\.)*)([^\.]{4,})((\.[a-z]{1,4})*)(:[0-9]{1,5})?$/
quicksketch’s picture

Status: Active » Fixed
StatusFileSize
new1022 bytes

I've committed the attached patch to the D6 and D7 versions which will disregard all port numbers within links.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.