mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 16:14:40 +00:00
UrlParser.parseValidUrls filtered every detected URL through isValidTopLevelDomain(), which requires the TLD's first character to be an ASCII letter. IPv6 literal hosts are bracketed (e.g. [2001:db8::1]) and have no dotted TLD, so the whole bracketed host became the candidate "TLD", starting with '[' and failing the check. As a result, valid IPv6 URLs like http://[302:68d0:f0d5:b88d::bdb]/<hash> were dropped and rendered as plain text instead of links. The UrlDetector already validates the bracketed address as syntactically correct IPv6, so accept bracketed hosts directly in isValidTopLevelDomain.