Country code TLDs in external links not handled properly

Created on 8 November 2023, about 1 year ago
Updated 9 July 2024, 5 months ago

Problem/Motivation

For a website with domain name "foo.tld", the external URL "foo.tld.countrycode" is not recognized as external.

Steps to reproduce

As real example, while working on childcare.gov, content editors noted that links to the external site https://www.childcare.gov.mp (with the country code TLD) were not recognized as external.

Proposed resolution

The regex pattern in extlinks.js needs adjustment to discern this better. (I'd propose a patch, but my regex skills aren't up to the task.)
I was able to workaround the issue by adding a matching pattern (childcare.gov\.[a-z]{2,3}) on the configuration form, so the links on the page noted above do now show up as external.

Remaining tasks

Tweak the regex expression in extlinks.js. (I do understand if this is an edge case and is marked as "will not fix," especially since there is a workaround.)

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Closed: cannot reproduce

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States msypes

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024