This issue resulted in having to remove the social media link implementation until we can figure out a way around it. FB's sharer URL validator seems to be strict and follow the distinction made in this Stack Overflow post between domain name and hostname.
Twitter's share URL is OK with them, and pasting a link to a hostname with underscores directly into FB works.
Replication:
Possible workarounds:
- do space replacement on hyphens as well as underscores. Convert any hostnames with underscores into hyphenated ones when sharing to social media. Disadvantage: people can no longer use hyphenated words in subdomains
- do space replacement in subdomain via a double hyphen
-- as well as underscores. Convert any hostnames with underscores into double hyphentated when sharing to social media.
- travel back in time and make the hostname spec the same as the domain name spec Judged non-viable
Option 2 is probably the least bad.
This issue resulted in having to remove the social media link implementation until we can figure out a way around it. FB's sharer URL validator seems to be strict and follow the distinction made in this Stack Overflow post between domain name and hostname.
Twitter's share URL is OK with them, and pasting a link to a hostname with underscores directly into FB works.
Replication:
Possible workarounds:
--as well as underscores. Convert any hostnames with underscores into double hyphentated when sharing to social media.Option 2 is probably the least bad.