I'd like to check whether a hostname ends in a known TLD. I don't want to do DNS lookups. Possible usecases for that: - More extensive checks on hostnames entered by the user, where apppropriate - Guessing whether a given string is a hostname or freetext URL, e.g. - in the awesomebar - in the URL recognition in plaintext mails We have nsIEffectiveTLDService (the origin of <http://www.publicsuffix.org>), but getBaseDomainFromHost("utter.non.sense") returns "non.sense". That makes it useless for my usecase. I see no other function to check whether the TLD is in the list at all or not. Also, the list is unfortunately directly compiled in, so I can't even load and parse it myself. <http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/dns/nsIEffectiveTLDService.idl>
Summary: Check whether a hostname is in a known TLD. Add function to nsIEffectiveTLDService. → Check whether a hostname is in a known TLD. Add function to nsIEffectiveTLDService
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.